/* ═══════════════════ پوسته پنل ═══════════════════
   منو: sticky، اسکرول مستقل از محتوا.
   محتوا: اسکرول عادی صفحه + تاپبار sticky شیشه‌ای. */

:root {
  --sidebar-w: 280px;
  --topbar-h: 68px;
}

.dashboard-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

/* ─── منوی کناری ─── */

.dashboard-sidebar {
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-deep) 100%);
  border-left: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  position: sticky;
  top: 0;
}

/* برند روی زمینهٔ تیرهٔ منو */
.dashboard-sidebar .brand-mark strong { color: var(--sidebar-text-strong); }
.dashboard-sidebar .brand-mark small { color: var(--sidebar-text); }

.dashboard-sidebar .sidebar-close-btn { color: var(--sidebar-text); }

.sidebar-header {
  align-items: center;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  flex-shrink: 0;
  justify-content: space-between;
  min-height: var(--topbar-h);
  padding: 0.9rem 1.15rem;
}

.sidebar-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

/* جستجوی منو */
.sidebar-search {
  align-items: center;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
  margin: 0.9rem 1rem 0.35rem;
  padding: 0 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}

.sidebar-search:focus-within {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(14, 166, 120, 0.5);
}

.sidebar-search i { color: var(--sidebar-text); font-size: 0.85rem; }

.sidebar-search input {
  background: none;
  border: none;
  color: var(--sidebar-text-strong);
  flex: 1;
  font: inherit;
  font-size: 0.85rem;
  min-height: 38px;
  min-width: 0;
  outline: none;
  padding: 0;
}

.sidebar-search input::placeholder { color: var(--sidebar-text); }

.sidebar-search-clear {
  background: none;
  border: none;
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0.2rem;
}

.sidebar-search-clear:hover { color: var(--color-danger); }

/* ناوبری — تنها ناحیه اسکرول‌شونده منو */
.sidebar-nav-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
}

.sidebar-nav {
  height: 100%;
  min-height: 0;
  -ms-overflow-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.5rem 1rem 1rem;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
  height: 0;
  width: 0;
}

.sidebar-scroll-down {
  align-items: center;
  background: transparent;
  border: 0;
  bottom: 0.7rem;
  box-shadow: none;
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  left: 50%;
  padding: 0;
  position: absolute;
  transform: translateX(-50%);
  width: 48px;
  z-index: 2;
}

.sidebar-scroll-down:hover { color: #cbd5e1; }

.sidebar-scroll-down:focus-visible {
  outline: 3px solid rgba(110, 231, 183, 0.55);
  outline-offset: 2px;
}

.sidebar-scroll-down-icon {
  animation: sidebar-arrow-bounce 2.4s ease-in-out infinite;
  height: 18px;
  overflow: visible;
  transform-origin: center bottom;
  width: 32px;
}

.sidebar-scroll-down-icon path {
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}

@keyframes sidebar-arrow-bounce {
  0%, 30%, 100% { transform: translateY(0) scaleY(1); }
  43% { transform: translateY(6px) scaleY(0.82); }
  51% { transform: translateY(-3px) scaleY(1.04); }
  59% { transform: translateY(4px) scaleY(0.88); }
  67% { transform: translateY(-1.5px) scaleY(1.02); }
  74% { transform: translateY(2px) scaleY(0.94); }
  81% { transform: translateY(0) scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-scroll-down-icon { animation: none; }
}

.sidebar-empty {
  color: var(--sidebar-text);
  font-size: 0.85rem;
  padding: 1rem 0.5rem;
  text-align: center;
}

.side-section { display: grid; gap: 2px; margin-bottom: 0.9rem; }

.side-kicker {
  color: var(--sidebar-text);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin: 0.35rem 0.5rem 0.3rem;
  opacity: 0.75;
  text-transform: uppercase;
}

.side-link {
  align-items: center;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  display: flex;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 0.65rem;
  padding: 0.5rem 0.55rem;
  position: relative;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}

.side-link:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-text-strong);
  transform: translateX(-2px);
}

.side-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active-text);
  font-weight: 900;
}

.side-link.active::before {
  background: var(--color-primary);
  border-radius: 999px;
  bottom: 8px;
  content: '';
  position: absolute;
  right: -6px;
  top: 8px;
  width: 3px;
}

.side-icon {
  align-items: center;
  background: var(--sidebar-icon-bg);
  border-radius: 9px;
  color: var(--sidebar-text);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.95rem;
  height: 32px;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  width: 32px;
}

.side-link:hover .side-icon { color: var(--sidebar-text-strong); }

.side-link.active .side-icon {
  background: var(--color-primary);
  color: white;
}

.side-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* گروه بازشونده */
.side-group-btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  text-align: right;
  width: 100%;
}

.side-chevron {
  color: var(--sidebar-text);
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.side-chevron.open { transform: rotate(180deg); }

.side-children {
  border-right: 2px solid var(--sidebar-border);
  display: grid;
  gap: 2px;
  margin: 2px 1.1rem 4px 0;
  overflow: hidden;
  padding-right: 0.6rem;
}

.side-link--sub { font-size: 0.83rem; padding: 0.4rem 0.5rem; }

.side-link--sub .side-icon {
  background: transparent;
  font-size: 0.85rem;
  height: 24px;
  width: 24px;
}

.side-link--sub.active .side-icon { background: transparent; color: var(--sidebar-active-text); }
.side-link--sub.active::before { display: none; }

/* ─── آیتم ماژول غیرفعال (قفل) ─── */

.side-link--locked {
  color: var(--sidebar-text);
  opacity: 0.72;
}

.side-link--locked:hover {
  opacity: 0.9;
  transform: none;
}

.side-link--locked .side-icon {
  background: var(--sidebar-icon-bg);
  color: var(--sidebar-text);
}

.side-lock-badge {
  color: var(--sidebar-text);
  flex-shrink: 0;
  font-size: 0.78rem;
  opacity: 0.8;
}

/* کارت کاربر پایین منو */
.sidebar-user {
  align-items: center;
  background: rgba(148, 163, 184, 0.05);
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  flex-shrink: 0;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
}

/* لینک پروفایل در کارت کاربر منو */
.sidebar-user-link {
  align-items: center;
  border-radius: var(--radius-sm);
  display: flex;
  flex: 1;
  gap: 0.65rem;
  min-width: 0;
  padding: 0.2rem 0.3rem;
  margin: -0.2rem -0.3rem;
  position: relative;
  transition: background 0.15s;
}

.sidebar-user-link:hover { background: var(--sidebar-hover); }

.sidebar-user .sidebar-user-meta strong { color: var(--sidebar-text-strong); }
.sidebar-user .sidebar-user-meta small { color: var(--sidebar-text); }

.sidebar-avatar,
.topbar-avatar {
  align-items: center;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 0.82rem;
  font-weight: 900;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.sidebar-user-meta,
.topbar-user-meta {
  display: grid;
  flex: 1;
  gap: 1px;
  min-width: 0;
}

.sidebar-user-meta strong,
.topbar-user-meta strong {
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-meta small,
.topbar-user-meta small {
  color: var(--color-text-soft);
  font-size: 0.72rem;
}

.sidebar-logout,
.topbar-logout {
  align-items: center;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  height: 34px;
  justify-content: center;
  transition: 0.15s;
  width: 34px;
}

.topbar-logout:hover {
  background: #FEF2F2;
  border-color: #FECACA;
  color: var(--color-danger);
}

.sidebar-logout { color: var(--sidebar-text); }

.sidebar-logout:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.35);
  color: #F87171;
}

[data-theme='dark'] .topbar-logout:hover {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(220, 38, 38, 0.35);
  color: #F87171;
}

/* ─── تاپبار ─── */

.dashboard-main { display: flex; flex-direction: column; min-width: 0; width: 100%; }

.dashboard-topbar {
  align-items: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: var(--topbar-h);
  padding: 0.6rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-right { align-items: center; display: flex; flex: 1 1 auto; gap: 0.75rem; min-width: 0; }

.dashboard-topbar h1 {
  font-size: 1.25rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-left { align-items: center; display: flex; flex: 0 1 auto; gap: 0.9rem; min-width: 0; }

.topbar-date {
  align-items: center;
  background: var(--color-primary-soft-2);
  border: 1px solid var(--color-primary-soft);
  border-radius: 999px;
  color: var(--color-primary-active);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 800;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  white-space: nowrap;
}

.topbar-clock {
  border-right: 1px solid var(--color-primary-soft);
  font-variant-numeric: tabular-nums;
  margin-right: 0.45rem;
  padding-right: 0.55rem;
}

.topbar-user { align-items: center; display: flex; gap: 0.6rem; }

.topbar-user-link {
  align-items: center;
  border-radius: var(--radius-sm);
  color: inherit;
  display: flex;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.25rem 0.4rem;
  margin: -0.25rem -0.4rem;
  position: relative;
  transition: background 0.15s;
}

.topbar-user-link:hover { background: var(--color-surface-muted); }

.topbar-avatar { font-size: 0.78rem; height: 36px; width: 36px; }

.profile-attention-dot {
  border: 2px solid var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  height: 12px;
  position: absolute;
  right: 27px;
  top: 1px;
  width: 12px;
}

.profile-attention-dot--warning { background: #f59e0b; }

.profile-attention-dot--danger {
  background: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.16);
}

.sidebar-user-link .profile-attention-dot {
  border-color: var(--sidebar-bg);
  right: 25px;
  top: -3px;
}

/* دکمه تغییر حالت روشن/تاریک */
.topbar-theme-btn {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  height: 38px;
  justify-content: center;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  width: 38px;
}

.topbar-theme-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
  transform: rotate(15deg);
}

/* ─── محتوا ─── */

.dashboard-content { flex: 1; min-width: 0; padding: 1.5rem; width: 100%; }

.dashboard-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.page-stack {
  display: grid;
  gap: 1.25rem;
}

.section-header {
  align-items: end;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.section-header h2,
.panel-card h2,
.panel-card h3 {
  margin: 0;
}

.section-header p,
.panel-card p {
  color: var(--color-text-muted);
  line-height: 1.9;
  margin: 0.45rem 0 0;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  min-width: 0;
}

.metric-card,
.panel-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  min-width: 0;
  padding: 1.25rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

/* Student file tabs — segmented control.
   Wraps onto multiple rows instead of scrolling sideways, so every tab is
   always reachable without a hidden scroll affordance. */
.student-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.3rem;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: calc(var(--radius-md) + 0.3rem);
}

.student-tab {
  position: relative;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: max-content;
  padding: 0.55rem 0.9rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.student-tab:hover {
  color: var(--color-text);
  background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}

.student-tab:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: -2px;
}

.student-tab.is-active {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 2px 10px rgba(14, 166, 120, 0.28);
}

.student-tab.is-active:hover {
  background: var(--color-primary);
  color: #fff;
}

.student-tab i {
  font-size: 0.95rem;
  opacity: 0.9;
}

.student-tab-count {
  min-width: 1.15rem;
  padding: 0 0.3rem;
  border-radius: 99px;
  background: var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
  transition: background 0.18s, color 0.18s;
}

.student-tab.is-active .student-tab-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* Panel fades in on tab change so the switch is visible.
   Also re-establishes the column gap that page-stack would otherwise give
   these sections directly. */
.student-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: student-tab-in 0.22s ease-out;
}

@keyframes student-tab-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 560px) {
  .student-tab {
    flex: 1 1 calc(33.333% - 0.3rem);
    padding: 0.5rem 0.4rem;
    font-size: 0.8rem;
  }
  .student-tab i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .student-tab,
  .student-tab-count { transition: none; }
  .student-tab-panel { animation: none; }
}

/* Clickable roster rows (teacher class register) */
.roster-table .roster-row {
  transition: background 0.15s;
}

.roster-table .roster-row:hover {
  background: var(--color-primary-soft);
}

/* Quick access tiles (teacher dashboard) */
.quick-access-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.625rem;
}

.quick-access-tile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.18s, box-shadow 0.18s;
}

.quick-access-tile:hover,
.quick-access-tile:focus-visible {
  border-color: var(--color-primary);
  background: var(--color-primary-soft);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(14, 166, 120, 0.16);
  outline: none;
}

.quick-access-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 1.05rem;
  transition: background 0.18s, color 0.18s;
}

.quick-access-tile:hover .quick-access-icon,
.quick-access-tile:focus-visible .quick-access-icon {
  background: var(--color-primary);
  color: #fff;
}

.quick-access-label {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.quick-access-chevron {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  opacity: 0;
  transform: translateX(0.25rem);
  transition: opacity 0.18s, transform 0.18s;
}

.quick-access-tile:hover .quick-access-chevron,
.quick-access-tile:focus-visible .quick-access-chevron {
  opacity: 1;
  transform: translateX(0);
  color: var(--color-primary);
}

@media (prefers-reduced-motion: reduce) {
  .quick-access-tile,
  .quick-access-icon,
  .quick-access-chevron {
    transition: none;
  }

  .quick-access-tile:hover,
  .quick-access-tile:focus-visible {
    transform: none;
  }
}

a.metric-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 6px 24px rgba(14, 166, 120, 0.14);
}

.metric-card span {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.metric-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1.1;
}

.status-pill {
  background: var(--color-primary-soft);
  border-radius: 999px;
  color: var(--color-primary-active);
  font-weight: 900;
  padding: 0.5rem 0.85rem;
}

.status-pill.info {
  background: var(--color-accent-soft);
  color: var(--color-accent-hover);
}

.status-pill.warning {
  background: #FEF3C7;
  color: #A16207;
}

.status-pill.danger {
  background: #FEE2E2;
  color: var(--color-danger);
}

.split-panel {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.timeline-list,
.check-list,
.candidate-list {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-list li,
.check-list li,
.candidate-list li {
  align-items: center;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.8rem 0.9rem;
}

.icon-badge {
  align-items: center;
  background: var(--color-primary-soft);
  border-radius: var(--radius-md);
  color: var(--color-primary-active);
  display: inline-flex;
  font-size: 1.2rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.progress-track {
  background: var(--color-surface-muted);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  border-radius: inherit;
  height: 100%;
}

.mini-note {
  color: var(--color-text-soft);
  font-size: 0.88rem;
}

.usage-chart {
  align-items: end;
  display: flex;
  gap: 0.45rem;
  height: 160px;
}

.usage-chart span {
  background: linear-gradient(180deg, var(--color-accent), var(--color-primary));
  border-radius: 999px 999px 0 0;
  flex: 1;
  min-width: 16px;
}

/* ═══════════ کیت رابط کاربری ═══════════ */

/* هدر صفحه با آیکون و توضیح */
.page-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.page-header-body { align-items: flex-start; display: flex; gap: 0.9rem; min-width: 0; }

.page-header-icon {
  align-items: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-active));
  border-radius: var(--radius-md);
  box-shadow: 0 8px 20px rgba(14, 166, 120, 0.25);
  color: white;
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1.25rem;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.page-header h2 { font-size: 1.35rem; margin: 0; }

.page-header p {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.9;
  margin: 0.35rem 0 0;
}

.page-header-actions { display: flex; flex-shrink: 0; flex-wrap: wrap; gap: 0.6rem; }

/* کارت آماری */
.stat-card {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

a.stat-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 10px 28px rgba(14, 166, 120, 0.16);
  transform: translateY(-2px);
}

.stat-card-icon {
  align-items: center;
  border-radius: var(--radius-md);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1.3rem;
  height: 50px;
  justify-content: center;
  width: 50px;
}

.stat-card-icon.tone-primary { background: var(--color-primary-soft); color: var(--color-primary-active); }
.stat-card-icon.tone-info    { background: var(--color-accent-soft);  color: var(--color-accent-hover); }
.stat-card-icon.tone-warning { background: #FEF3C7; color: #A16207; }
.stat-card-icon.tone-danger  { background: #FEE2E2; color: var(--color-danger); }
.stat-card-icon.tone-violet  { background: #EDE9FE; color: #7C3AED; }

.stat-card-body { display: grid; gap: 2px; min-width: 0; }
.stat-card-body span { color: var(--color-text-muted); font-size: 0.82rem; font-weight: 700; }
.stat-card-body strong { font-size: 1.6rem; font-weight: 900; line-height: 1.15; }
.stat-card-body small { color: var(--color-text-soft); font-size: 0.75rem; }

/* حالت خالی */
.empty-state {
  align-items: center;
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.empty-state > i {
  color: var(--color-border);
  font-size: 2.8rem;
}

.empty-state h3 { font-size: 1.05rem; margin: 0.35rem 0 0; }

.empty-state p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.9;
  margin: 0;
  max-width: 420px;
}

.empty-state .btn { margin-top: 0.6rem; }

/* ─── صفحهٔ ماژول غیرفعال (قفل) ─── */

.module-disabled {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  padding: clamp(2.5rem, 7vw, 5rem) 1.5rem;
  text-align: center;
}

.module-disabled-icon {
  align-items: center;
  background: var(--color-primary-soft);
  border: 1px solid #bfe9d8;
  border-radius: 50%;
  color: var(--color-primary);
  display: inline-flex;
  font-size: clamp(2.5rem, 9vw, 3.6rem);
  height: clamp(5rem, 18vw, 7rem);
  justify-content: center;
  line-height: 1;
  width: clamp(5rem, 18vw, 7rem);
}

.module-disabled h2 {
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  margin: 0.6rem 0 0;
}

.module-disabled-message {
  color: var(--color-text);
  font-size: clamp(0.95rem, 3.5vw, 1.05rem);
  font-weight: 600;
  margin: 0;
}

.module-disabled-hint {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.9;
  margin: 0.25rem 0 0;
  max-width: 460px;
}

[data-theme='dark'] .module-disabled-icon {
  background: rgba(14, 166, 120, 0.16);
  border-color: rgba(14, 166, 120, 0.35);
}

/* راهنمای شناور */
.help-tip { display: inline-flex; position: relative; vertical-align: middle; }

.help-tip > button {
  align-items: center;
  background: var(--color-surface-muted);
  border: none;
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: help;
  display: inline-flex;
  font-size: 0.68rem;
  height: 18px;
  justify-content: center;
  margin-right: 0.35rem;
  width: 18px;
}

.help-tip > button:hover { background: var(--color-primary-soft); color: var(--color-primary-active); }

.help-tip-pop {
  background: #1E293B;
  border-radius: var(--radius-sm);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.3);
  color: #F1F5F9;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.8;
  padding: 0.6rem 0.8rem;
  position: absolute;
  right: 50%;
  top: calc(100% + 8px);
  transform: translateX(50%);
  width: max-content;
  max-width: 260px;
  z-index: 70;
}

/* بج آیکون‌دار */
.badge i { font-size: 0.7rem; margin-left: 0.25rem; }

/* ═══════════ مرورگر پایگاه داده ═══════════ */

.db-group-title {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  font-weight: 900;
  margin: 0 0 0.75rem;
}

.db-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.db-card {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.db-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 8px 22px rgba(14, 166, 120, 0.14);
  transform: translateY(-2px);
}

.db-card-icon {
  align-items: center;
  background: var(--color-primary-soft);
  border-radius: var(--radius-sm);
  color: var(--color-primary-active);
  display: inline-flex;
  flex-shrink: 0;
  font-size: 1.05rem;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.db-card-body { display: grid; flex: 1; gap: 1px; min-width: 0; }
.db-card-body strong { font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-card-body code { color: var(--color-text-soft); direction: ltr; font-size: 0.7rem; text-align: right; }

.db-card-count {
  color: var(--color-primary-active);
  display: grid;
  flex-shrink: 0;
  font-size: 1.05rem;
  font-weight: 900;
  justify-items: center;
  line-height: 1.2;
}

.db-card-count small { color: var(--color-text-soft); font-size: 0.65rem; font-weight: 400; }

.db-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 0.9rem 1.1rem;
}

.db-jump { align-items: center; display: flex; gap: 0.5rem; }
.db-jump span { color: var(--color-text-muted); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }

.db-jump select {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.85rem;
  max-width: 260px;
  min-height: 38px;
  padding: 0.3rem 0.6rem;
}

.db-table th { white-space: nowrap; }

.db-sort {
  align-items: center;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 0.3rem;
  padding: 0;
}

.db-sort:hover { color: var(--color-primary-active); }

.db-col-name { direction: ltr; }

.db-col-type {
  color: var(--color-text-soft);
  direction: ltr;
  display: block;
  font-size: 0.62rem;
  font-weight: 400;
  margin-top: 1px;
  text-align: right;
}

.db-table td { font-size: 0.82rem; max-width: 320px; overflow-wrap: break-word; }

.db-null { color: var(--color-text-soft); }
.db-date { color: var(--color-text-muted); font-size: 0.78rem; white-space: nowrap; }

.db-pagination {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.db-page-info { color: var(--color-text-muted); font-size: 0.85rem; font-weight: 700; }

/* ─── ویرایشگر ردیف جدول ─── */

.row-editing > td {
  background: var(--color-bg-soft);
  padding: 0 !important;
}

.db-editor {
  border-top: 2px solid var(--color-primary);
  display: grid;
  gap: 0.9rem;
  padding: 1.1rem 1.2rem;
}

.db-editor-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.db-editor-label {
  color: var(--color-text-soft);
  direction: ltr;
  display: block;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  text-align: right;
}

.db-editor-wide { grid-column: 1 / -1; }

.db-editor textarea,
.db-editor select {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font: inherit;
  font-size: 0.85rem;
  min-height: 40px;
  padding: 0.45rem 0.6rem;
  resize: vertical;
  width: 100%;
}

.db-editor textarea:focus,
.db-editor select:focus {
  border-color: var(--color-primary);
  outline: none;
}

.db-editor-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
}

/* Attendance sheet compact status cards */
.attendance-action-panel {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.attendance-mini-cards {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  width: min(100%, 430px);
}

.attendance-mini-card {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.14rem;
  grid-template-columns: 30px 1fr;
  min-height: 58px;
  padding: 0.55rem 0.65rem;
}

.attendance-mini-card i {
  align-items: center;
  border-radius: 9px;
  display: inline-flex;
  font-size: 0.95rem;
  grid-row: span 2;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.attendance-mini-card span {
  color: var(--color-text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.1;
}

.attendance-mini-card strong {
  color: var(--color-text);
  font-size: 0.88rem;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attendance-mini-card--present i { background: #dcfce7; color: #16a34a; }
.attendance-mini-card--absent i { background: #fee2e2; color: #dc2626; }
.attendance-mini-card--saved i,
.attendance-mini-card--idle i { background: var(--color-primary-soft-2); color: var(--color-primary-active); }
.attendance-mini-card--dirty i { background: #fef3c7; color: #b45309; }
.attendance-mini-card--error i { background: #fee2e2; color: #dc2626; }

@media (max-width: 780px) {
  .attendance-action-panel {
    align-items: stretch;
    width: 100%;
  }

  .attendance-mini-cards {
    grid-template-columns: 1fr;
    width: 100%;
  }
}

/* ─── صفحه پروفایل ─── */

.profile-attention-panel {
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: var(--radius-md);
  color: #78350f;
  display: flex;
  gap: 0.85rem;
  padding: 0.95rem 1rem;
}

.profile-attention-panel--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.profile-attention-panel__icon {
  align-items: center;
  background: rgba(245, 158, 11, 0.18);
  border-radius: 50%;
  display: inline-flex;
  flex-shrink: 0;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.profile-attention-panel--danger .profile-attention-panel__icon { background: rgba(220, 38, 38, 0.12); }

.profile-attention-panel h2 {
  font-size: 0.98rem;
  margin: 0 0 0.25rem;
}

.profile-attention-panel p {
  color: inherit;
  font-size: 0.84rem;
  margin: 0;
  opacity: 0.84;
}

.profile-attention-panel__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.profile-attention-panel__items span {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.6rem;
}

.profile-locked-field {
  align-items: center;
  background: var(--color-surface-muted);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  direction: ltr;
  display: flex;
  font-variant-numeric: tabular-nums;
  gap: 0.5rem;
  justify-content: flex-end;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
}

.profile-locked-field i { color: var(--color-text-soft); font-size: 0.85rem; }

.profile-side {
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
}

.profile-avatar {
  align-items: center;
  border-radius: 50%;
  color: white;
  display: inline-flex;
  font-size: 1.6rem;
  font-weight: 900;
  height: 76px;
  justify-content: center;
  width: 76px;
}

.profile-meta {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  width: 100%;
}

.profile-meta li {
  align-items: center;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  font-size: 0.82rem;
  gap: 0.5rem;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
}

.profile-meta li span { color: var(--color-text-muted); }
.profile-meta li strong { font-size: 0.85rem; }

/* عکس پروفایل — جایگزین آواتار حرفی */
.avatar--photo,
.profile-avatar--photo {
  background: var(--color-surface-muted);
  overflow: hidden;
  padding: 0;
}

.avatar--photo img,
.profile-avatar--photo img {
  border-radius: inherit;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-avatar--photo {
  border: 2px solid var(--color-border);
  border-radius: 50%;
}

.profile-avatar-actions {
  display: flex;
  gap: 0.45rem;
  justify-content: center;
}

/* ─── پنجره مودال وسط صفحه ─── */

.modal-overlay {
  align-items: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(11, 17, 32, 0.55);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 1rem;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1000;
}

.modal-box {
  animation: modal-in 0.2s ease-out both;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 1rem;
  max-height: 90dvh;
  max-width: 560px;
  overflow-y: auto;
  padding: 1.4rem 1.5rem;
  width: 100%;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.modal-head h2 { font-size: 1.1rem; margin: 0; }

.modal-close {
  align-items: center;
  background: var(--color-surface-muted);
  border: none;
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.85rem;
  height: 32px;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  width: 32px;
}

.modal-close:hover { background: #FEE2E2; color: var(--color-danger); }

.modal-hint {
  background: var(--color-primary-soft-2);
  border: 1px solid var(--color-primary-soft);
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-size: 0.85rem;
  line-height: 1.9;
  margin: 0;
  padding: 0.6rem 0.85rem;
}

/* بسته‌های شارژ */
.charge-packs {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
}

.charge-pack {
  background: var(--color-bg-soft);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 2px;
  justify-items: center;
  padding: 0.7rem 0.4rem;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.charge-pack:hover { border-color: var(--color-primary); transform: translateY(-2px); }

.charge-pack.selected {
  background: var(--color-primary-soft);
  border-color: var(--color-primary);
}

.charge-pack strong { color: var(--color-text); font-size: 1.05rem; }
.charge-pack span { color: var(--color-text-muted); font-size: 0.72rem; }
.charge-pack small { color: var(--color-primary-active); font-size: 0.72rem; font-weight: 700; }

.charge-summary {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
}

.charge-summary > div {
  align-items: center;
  display: flex;
  font-size: 0.88rem;
  justify-content: space-between;
}

.charge-summary span { color: var(--color-text-muted); }
.charge-gift { color: var(--color-success); }

.charge-total {
  border-top: 1px dashed var(--color-border);
  font-size: 0.95rem !important;
  padding-top: 0.5rem;
}

.charge-total strong { color: var(--color-primary-active); font-size: 1.05rem; }

/* ─── تطبیق رنگ‌های ثابت با حالت تاریک ─── */

[data-theme='dark'] .status-pill.warning { background: rgba(245, 158, 11, 0.16); color: #FBBF24; }
[data-theme='dark'] .status-pill.danger { background: rgba(220, 38, 38, 0.16); color: #F87171; }
[data-theme='dark'] .stat-card-icon.tone-warning { background: rgba(245, 158, 11, 0.16); color: #FBBF24; }
[data-theme='dark'] .stat-card-icon.tone-danger { background: rgba(220, 38, 38, 0.16); color: #F87171; }
[data-theme='dark'] .stat-card-icon.tone-violet { background: rgba(124, 58, 237, 0.22); color: #A78BFA; }

/* ─── اسکلت شیمر ─── */

@keyframes shimmer {
  0%   { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.skeleton {
  animation: shimmer 1.6s ease-in-out infinite;
  background: linear-gradient(
    90deg,
    var(--color-surface-muted) 25%,
    var(--color-bg-soft) 50%,
    var(--color-surface-muted) 75%
  );
  background-size: 200% 100%;
  border-radius: var(--radius-sm);
}

[data-theme='dark'] .skeleton {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.06) 25%,
    rgba(255,255,255,0.12) 50%,
    rgba(255,255,255,0.06) 75%
  );
  background-size: 200% 100%;
}

/* ─── آیکون چرخشی بارگذاری ─── */

@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

.btn-spin-icon {
  animation: btn-spin 0.65s linear infinite;
  display: inline-block;
}

/* ─── ورود کارت‌های داشبورد ─── */

@keyframes card-enter {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dashboard-grid--animated > * {
  animation: card-enter 0.35s ease backwards;
}

.dashboard-grid--animated > *:nth-child(1) { animation-delay: 0.04s; }
.dashboard-grid--animated > *:nth-child(2) { animation-delay: 0.09s; }
.dashboard-grid--animated > *:nth-child(3) { animation-delay: 0.14s; }
.dashboard-grid--animated > *:nth-child(4) { animation-delay: 0.19s; }
.dashboard-grid--animated > *:nth-child(5) { animation-delay: 0.24s; }
.dashboard-grid--animated > *:nth-child(6) { animation-delay: 0.29s; }
.dashboard-grid--animated > *:nth-child(7) { animation-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
  .dashboard-grid--animated > * { animation: none; }
  .btn-spin-icon { animation: none; }
  .skeleton { animation: none; }
  .topbar-icon-btn--ringing .bi-bell { animation: none; }
}

/* ─── دکمه آیکون تاپبار (ناقوس / جستجو) ─── */

.topbar-icon-btn {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  height: 38px;
  justify-content: center;
  position: relative;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  width: 38px;
}

.topbar-icon-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

.topbar-icon-btn--ringing {
  border-color: #ef4444;
  color: #ef4444;
}

.topbar-icon-btn--ringing .bi-bell {
  animation: bell-ring 1.1s ease-in-out infinite;
  transform-origin: 50% 0%;
}

@keyframes bell-ring {
  0%, 45%, 100% { transform: rotate(0deg); }
  8%, 24% { transform: rotate(16deg); }
  16%, 32% { transform: rotate(-16deg); }
}

/* ─── ناقوس اعلان‌ها ─── */

.notif-bell { position: relative; }

.notif-badge {
  align-items: center;
  background: #ef4444;
  border: 2px solid var(--color-surface);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.6rem;
  font-weight: 900;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 3px;
  position: absolute;
  top: -2px;
  left: -2px;
  pointer-events: none;
}

.notif-panel {
  animation: modal-in 0.18s ease-out both;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.22);
  max-height: 420px;
  min-width: 320px;
  overflow: hidden;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
}

.notif-panel-head {
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  font-size: 0.85rem;
  font-weight: 800;
  justify-content: space-between;
  padding: 0.7rem 1rem;
}

.notif-markall {
  background: none;
  border: none;
  color: var(--color-primary-active);
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  padding: 0;
}

.notif-markall:hover { text-decoration: underline; }

.notif-list { flex: 1; overflow-y: auto; }

.notif-empty {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  padding: 1.5rem;
  text-align: center;
}

.notif-item {
  align-items: flex-start;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  cursor: default;
  display: flex;
  font: inherit;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  text-align: right;
  transition: background 0.12s;
  width: 100%;
}

.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-bg-soft); }
.notif-item--link { cursor: pointer; }
.notif-item--unread { background: var(--color-primary-soft-2); }
.notif-item--unread:hover { background: var(--color-primary-soft); }

.notif-dot {
  background: var(--color-border);
  border-radius: 50%;
  flex-shrink: 0;
  height: 8px;
  margin-top: 6px;
  width: 8px;
}

.notif-item--unread .notif-dot { background: var(--color-primary); }

.notif-content { display: grid; flex: 1; gap: 2px; min-width: 0; }
.notif-title { font-size: 0.82rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-body { color: var(--color-text-muted); font-size: 0.78rem; line-height: 1.5; }
.notif-time { color: var(--color-text-soft); font-size: 0.72rem; }

/* ─── جستجوی سراسری ─── */

.gsearch-wrap { position: relative; }

.gsearch-trigger { border-radius: 8px !important; font-size: 0.9rem !important; width: auto !important; padding: 0 .65rem !important; gap: 0.4rem; }

.gsearch-trigger::after {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  color: var(--color-text-soft);
  content: 'Ctrl K';
  font-size: 0.65rem;
  padding: 1px 4px;
  white-space: nowrap;
}

.gsearch-panel {
  animation: modal-in 0.18s ease-out both;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  left: 0;
  min-width: 360px;
  overflow: hidden;
  position: absolute;
  top: calc(100% + 10px);
  z-index: 500;
}

.gsearch-input-row {
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.gsearch-icon { color: var(--color-text-soft); flex-shrink: 0; font-size: 0.9rem; }

.gsearch-input {
  background: none;
  border: none;
  color: var(--color-text);
  flex: 1;
  font: inherit;
  font-size: 0.9rem;
  min-height: 36px;
  min-width: 0;
  outline: none;
}

.gsearch-close {
  align-items: center;
  background: none;
  border: none;
  color: var(--color-text-soft);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.75rem;
  padding: 0.2rem;
}

.gsearch-results { max-height: 320px; overflow-y: auto; }

.gsearch-hint {
  color: var(--color-text-soft);
  font-size: 0.8rem;
  padding: 0.9rem 1rem;
  text-align: center;
}

.gsearch-empty {
  color: var(--color-text-muted);
  font-size: 0.82rem;
  padding: 1rem;
  text-align: center;
}

.gsearch-item {
  align-items: center;
  background: none;
  border: none;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  text-align: right;
  transition: background 0.12s;
  width: 100%;
}

.gsearch-item:last-child { border-bottom: none; }
.gsearch-item:hover { background: var(--color-bg-soft); }

.gsearch-item-icon {
  color: var(--color-primary-active);
  flex-shrink: 0;
  font-size: 1rem;
}

.gsearch-item-text { display: grid; flex: 1; gap: 1px; min-width: 0; }
.gsearch-item-label { font-size: 0.85rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gsearch-item-sub { color: var(--color-text-soft); font-size: 0.75rem; }
.gsearch-item-type { color: var(--color-text-muted); font-size: 0.72rem; white-space: nowrap; }

/* ─── جدول مدارس سوپرادمین ─── */

.super-schools-table {
  table-layout: fixed;
  min-width: 1060px;
}

.super-schools-table th,
.super-schools-table td {
  vertical-align: middle;
}

.super-schools-table th:nth-child(1),
.super-schools-table td:nth-child(1) { width: 150px; }
.super-schools-table th:nth-child(2),
.super-schools-table td:nth-child(2) { width: 108px; }
.super-schools-table th:nth-child(3),
.super-schools-table td:nth-child(3) { width: 100px; }
.super-schools-table th:nth-child(4),
.super-schools-table td:nth-child(4) { width: 86px; }
.super-schools-table th:nth-child(5),
.super-schools-table td:nth-child(5) { width: 150px; }
.super-schools-table th:nth-child(6),
.super-schools-table td:nth-child(6) { width: 118px; }
.super-schools-table th:nth-child(7),
.super-schools-table td:nth-child(7) { width: 82px; }
.super-schools-table th:nth-child(8),
.super-schools-table td:nth-child(8) { width: 92px; }
.super-schools-table th:nth-child(9),
.super-schools-table td:nth-child(9) { width: 270px; }

.school-name-cell,
.school-owner-cell,
.school-license-cell {
  line-height: 1.65;
}

.school-code-cell {
  direction: ltr;
  font-weight: 800;
  text-align: center !important;
}

.school-sms-cell {
  font-weight: 800;
  text-align: center !important;
}

.school-actions {
  display: grid;
  gap: 0.4rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.school-action-btn,
.school-action-icon {
  align-items: center;
  border: 1px solid rgba(14, 166, 120, 0.18);
  border-radius: 8px;
  color: #0f766e;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 900;
  gap: 0.3rem;
  justify-content: center;
  min-height: 34px;
  min-width: 0;
  padding: 0.35rem 0.45rem;
  text-decoration: none;
  white-space: nowrap;
}

.school-action-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.school-action-btn i,
.school-action-icon i {
  flex-shrink: 0;
  font-size: 0.9rem;
}

.school-action-btn--modules,
.school-action-btn--sms {
  background: rgba(20, 184, 166, 0.14);
}

.school-action-btn--renew {
  background: rgba(16, 185, 129, 0.14);
}

.school-action-btn--alert {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.22);
  color: #a16207;
}

.school-action-btn--status,
.school-action-icon {
  background: var(--color-bg-soft);
  border-color: var(--color-border);
  color: var(--color-text-muted);
}

.school-action-btn--archive {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.school-action-btn:hover,
.school-action-icon:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

/* ─── اخبار داشبورد مدرسه ─── */

.dashboard-feed-panel {
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(14, 166, 120, 0.16);
}

.dashboard-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(14, 166, 120, 0.08), rgba(37, 99, 235, 0.06));
}

.dashboard-feed-kicker {
  display: block;
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.dashboard-feed-head h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-feed-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.dashboard-feed-count {
  min-width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

.dashboard-feed-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.78fr) minmax(0, 1.4fr);
  min-height: 220px;
}

.dashboard-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem;
  background: var(--color-bg-soft);
  border-left: 1px solid var(--color-border);
}

.dashboard-feed-tab {
  --feed-color: var(--color-primary);
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text);
  text-align: right;
  padding: 0.62rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dashboard-feed-tab:hover,
.dashboard-feed-tab.is-active {
  border-color: color-mix(in srgb, var(--feed-color) 38%, transparent);
  background: #fff;
  transform: translateX(-2px);
}

.dashboard-feed-tab.is-important .dashboard-feed-tab-icon {
  animation: dashboard-feed-pulse 1.8s ease-in-out infinite;
}

.dashboard-feed-tab-icon {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--feed-color);
  background: color-mix(in srgb, var(--feed-color) 12%, white);
}

.dashboard-feed-tab-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dashboard-feed-tab-text strong,
.dashboard-feed-tab-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-feed-tab-text strong {
  font-size: 0.86rem;
}

.dashboard-feed-tab-text small {
  color: var(--color-text-muted);
  font-size: 0.73rem;
}

.dashboard-feed-card {
  --feed-color: var(--color-primary);
  position: relative;
  padding: 1.05rem 1.15rem 1.2rem;
  border-right: 6px solid var(--feed-color);
  background: #fff;
}

.dashboard-feed-card--pulse {
  animation: dashboard-feed-card-glow 1.9s ease-in-out infinite;
}

.dashboard-feed-image {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  margin-bottom: 0.85rem;
}

.dashboard-feed-card-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.dashboard-feed-card-icon {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--feed-color);
  background: color-mix(in srgb, var(--feed-color) 12%, white);
}

.dashboard-feed-badge {
  border: 1px solid color-mix(in srgb, var(--feed-color) 35%, transparent);
  border-radius: 999px;
  color: var(--feed-color);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.16rem 0.55rem;
}

.dashboard-feed-close {
  margin-right: auto;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 999px;
  background: var(--color-bg-soft);
  color: var(--color-text-muted);
  cursor: pointer;
}

.dashboard-feed-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.05rem;
}

.dashboard-feed-text {
  margin: 0;
  color: var(--color-text);
  font-size: 0.9rem;
  line-height: 1.9;
}

.dashboard-feed-text a {
  color: var(--feed-color);
  font-weight: 700;
  text-decoration: none;
}

@keyframes dashboard-feed-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--feed-color) 30%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--feed-color) 0%, transparent); }
}

@keyframes dashboard-feed-card-glow {
  0%, 100% { box-shadow: inset 0 0 0 0 color-mix(in srgb, var(--feed-color) 0%, transparent); }
  50% { box-shadow: inset 0 0 0 999px color-mix(in srgb, var(--feed-color) 4%, white); }
}

@media (max-width: 760px) {
  .dashboard-feed-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-feed-actions {
    align-items: flex-start;
  }

  .dashboard-feed-body {
    grid-template-columns: 1fr;
  }

  .dashboard-feed-list {
    border-left: 0;
    border-bottom: 1px solid var(--color-border);
  }
}

.dashboard-news-page {
  --news-color: var(--color-primary);
}

.news-composer {
  background:
    linear-gradient(135deg, rgba(14, 166, 120, 0.08), transparent 36%),
    var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1.25rem;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  padding: 1.1rem;
}

.news-composer-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
}

.news-composer-head,
.news-list-head,
.news-label-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.news-composer-head h3,
.news-list-head h3 {
  font-size: 1.05rem;
  margin: 0.2rem 0 0;
}

.news-list-head p {
  color: var(--color-text-muted);
  font-size: 0.84rem;
  margin: 0.25rem 0 0;
}

.news-kicker {
  color: var(--color-primary-active);
  font-size: 0.75rem;
  font-weight: 900;
}

.news-template-chip {
  align-items: center;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 900;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  white-space: nowrap;
}

.news-form-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.news-form-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-editor-tools {
  display: inline-flex;
  gap: 0.3rem;
}

.news-editor-tools button {
  align-items: center;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.news-editor-tools button:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

.news-template-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.news-template-card {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  cursor: pointer;
  display: grid;
  gap: 0.15rem;
  min-height: 92px;
  padding: 0.7rem 0.6rem;
  text-align: right;
}

.news-template-card i {
  color: var(--template-color);
  font-size: 1.15rem;
}

.news-template-card span {
  font-weight: 900;
}

.news-template-card small {
  color: var(--color-text-soft);
  font-size: 0.7rem;
  line-height: 1.5;
}

.news-template-card.is-selected {
  background: color-mix(in srgb, var(--template-color) 10%, var(--color-surface));
  border-color: var(--template-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--template-color) 14%, transparent);
}

.news-color-field {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  gap: 0.65rem;
  min-height: 46px;
  padding: 0.35rem 0.55rem;
}

.news-color-field input {
  background: none;
  border: none;
  cursor: pointer;
  height: 32px;
  padding: 0;
  width: 44px;
}

.news-color-field span {
  color: var(--color-text-muted);
  direction: ltr;
  font-size: 0.82rem;
}

.segmented-control {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.25rem;
  grid-template-columns: repeat(2, 1fr);
  min-height: 46px;
  padding: 0.25rem;
}

.segmented-control button {
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--color-text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
}

.segmented-control button.is-active {
  background: var(--color-surface);
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  color: var(--color-primary-active);
}

.news-upload {
  align-items: center;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  gap: 0.55rem;
  min-height: 46px;
  overflow: hidden;
  padding: 0.65rem 0.8rem;
}

.news-upload:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-active);
}

.news-upload span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-upload input {
  display: none;
}

.news-check {
  align-items: flex-start;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem;
}

.news-check input {
  height: 18px;
  margin-top: 0.2rem;
  width: 18px;
}

.news-check span {
  display: grid;
  gap: 0.1rem;
}

.news-check small {
  color: var(--color-text-muted);
  font-size: 0.78rem;
}

.news-preview-panel {
  align-self: start;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 0.8rem;
  min-width: 0;
  padding: 1rem;
  position: sticky;
  top: calc(var(--topbar-h) + 1rem);
}

.news-visual-card {
  background: var(--news-bg);
  border: 1px solid color-mix(in srgb, var(--news-color) 38%, transparent);
  border-right: 7px solid var(--news-color);
  border-radius: 8px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  color: var(--color-text);
  overflow: hidden;
}

.news-visual-card--pulse {
  animation: news-card-pulse 1.8s ease-in-out infinite;
}

@keyframes news-card-pulse {
  0%, 100% { box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08), 0 0 0 0 color-mix(in srgb, var(--news-color) 28%, transparent); }
  50% { box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12), 0 0 0 6px color-mix(in srgb, var(--news-color) 0%, transparent); }
}

.news-visual-image {
  aspect-ratio: 16 / 7;
  display: block;
  object-fit: cover;
  width: 100%;
}

.news-visual-content {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
}

.news-visual-card--compact .news-visual-content {
  gap: 0.42rem;
  padding: 0.75rem 0.9rem;
}

.news-visual-card--center .news-visual-content {
  justify-items: center;
  text-align: center;
}

.news-visual-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.news-visual-card--center .news-visual-top {
  justify-content: center;
}

.news-visual-icon {
  align-items: center;
  background: color-mix(in srgb, var(--news-color) 12%, white);
  border-radius: 999px;
  color: var(--news-color);
  display: inline-flex;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.news-visual-badge {
  background: var(--color-surface);
  border: 1px solid color-mix(in srgb, var(--news-color) 35%, transparent);
  border-radius: 999px;
  color: var(--news-color);
  font-size: 0.72rem;
  font-weight: 900;
  padding: 0.18rem 0.55rem;
}

.news-visual-badge--hot {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.news-visual-card h3 {
  font-size: 1.05rem;
  margin: 0;
}

.news-visual-card p {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.9;
  margin: 0;
  white-space: pre-wrap;
}

.news-visual-card p a,
.news-visual-link {
  color: var(--news-color);
  font-weight: 900;
  text-decoration: none;
}

.news-visual-card p a:hover,
.news-visual-link:hover {
  text-decoration: underline;
}

.news-visual-meta {
  color: var(--color-text-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 0.6rem;
}

.news-visual-link {
  align-items: center;
  display: inline-flex;
  gap: 0.35rem;
  justify-self: start;
}

.news-visual-card--center .news-visual-link {
  justify-self: center;
}

.news-list-panel {
  display: grid;
  gap: 1rem;
}

.news-list {
  display: grid;
  gap: 0.85rem;
}

.news-row-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: grid;
  gap: 0.7rem;
  padding: 0.7rem;
}

.news-row-meta {
  align-items: center;
  color: var(--color-text-soft);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.76rem;
  gap: 0.75rem;
}

.news-delete-btn {
  align-items: center;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.18);
  border-radius: 8px;
  color: #dc2626;
  cursor: pointer;
  display: inline-flex;
  height: 32px;
  justify-content: center;
  margin-right: auto;
  width: 32px;
}

.news-delete-btn:hover {
  background: rgba(239, 68, 68, 0.14);
}

.news-empty {
  align-items: center;
  color: var(--color-text-muted);
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  padding: 2rem 1rem;
  text-align: center;
}

.news-empty i {
  color: var(--color-primary);
  font-size: 2rem;
}

/* ─── iOS نصب PWA ─── */

.ios-prompt-overlay {
  align-items: flex-end;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background:
    radial-gradient(circle at 50% 10%, rgba(14, 166, 120, 0.22), transparent 34%),
    rgba(2, 12, 18, 0.68);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 1rem;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 2000;
}

.ios-prompt-card {
  animation: modal-in 0.25s ease-out both;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 26px;
  box-shadow: 0 -12px 55px rgba(0,0,0,0.34);
  max-width: 440px;
  overflow: hidden;
  padding: 1.45rem 1.25rem 1.25rem;
  position: relative;
  text-align: center;
  width: 100%;
}

.ios-prompt-close {
  align-items: center;
  background: var(--color-surface-muted);
  border: none;
  border-radius: 50%;
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.8rem;
  height: 30px;
  justify-content: center;
  position: absolute;
  top: 1rem;
  left: 1rem;
  transition: background 0.15s;
  width: 30px;
}

.ios-prompt-close:hover { background: #FEE2E2; color: var(--color-danger); }

.ios-prompt-logo {
  align-items: center;
  background:
    linear-gradient(145deg, rgba(14, 166, 120, 0.14), rgba(20, 184, 166, 0.04)),
    var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(14, 166, 120, 0.15);
  display: inline-flex;
  height: 86px;
  justify-content: center;
  margin-bottom: 1.05rem;
  padding: 0.45rem;
  width: 86px;
}

.ios-prompt-logo img {
  border-radius: 20px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.ios-prompt-title {
  color: var(--color-text);
  font-size: clamp(1.05rem, 4vw, 1.32rem);
  font-weight: 950;
  line-height: 1.45;
  margin: 0 2.2rem 0.45rem;
}

.ios-prompt-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  line-height: 1.85;
  margin: 0 auto 1rem;
  max-width: 320px;
}

.ios-prompt-steps {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0 0 1.1rem;
  padding: 0;
  text-align: right;
}

.ios-prompt-steps li {
  align-items: center;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  display: grid;
  gap: 0.55rem;
  grid-template-columns: 30px 42px minmax(0, 1fr);
  min-height: 70px;
  padding: 0.65rem 0.75rem;
}

.ios-step-number {
  align-items: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  color: var(--color-primary-active);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 950;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.ios-step-icon {
  align-items: center;
  background: rgba(14, 166, 120, 0.12);
  border-radius: 14px;
  color: var(--color-primary-active);
  display: inline-flex;
  font-size: 1.25rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.ios-step-text {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.ios-step-text strong {
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 950;
  line-height: 1.45;
}

.ios-step-text small {
  color: var(--color-text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.5;
}

.ios-prompt-btn {
  border-radius: 16px;
  font-size: 0.95rem;
  font-weight: 950;
  min-height: 56px;
  width: 100%;
}

@media (max-width: 380px) {
  .ios-prompt-overlay {
    padding: 0.65rem;
  }

  .ios-prompt-card {
    border-radius: 22px;
    padding: 1.25rem 1rem 1rem;
  }

  .ios-prompt-steps li {
    grid-template-columns: 28px 38px minmax(0, 1fr);
    min-height: 64px;
    padding: 0.55rem;
  }

  .ios-step-icon {
    height: 38px;
    width: 38px;
  }
}

/* ردیف انتخاب‌شده در جدول */
.row--selected { background: var(--color-primary-soft-2) !important; }
