/* ==========================================================================
   NEGAREH STUDENT PORTAL STYLES (assets/css/panel.css)
   سیستم طراحی و استایل‌های اختصاصی پنل کاربری موسسه آموزش عالی آزاد نگاره
   ========================================================================== */

/* --------------------------------------------------------------------------
   ۱. متغیرها و چیدمان کلی
   -------------------------------------------------------------------------- */
body.negareh-user-panel,
body.page-template-page-panel {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
}

/* هدر باریک اختصاصی پنل */
.panel-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.panel-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-hamburger-btn {
  display: none;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.panel-hamburger-btn:hover {
  background: var(--brand-teal);
  color: #fff;
}

.panel-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.panel-brand img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.panel-brand-meta {
  display: flex;
  flex-direction: column;
}

.panel-brand-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-teal);
  line-height: 1.2;
}

.panel-brand-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* آیکون‌های اعلان و ابزارها */
.panel-tool-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.panel-tool-btn:hover {
  color: var(--brand-teal);
  border-color: var(--brand-teal);
  background: rgba(13, 148, 136, 0.08);
}

.panel-tool-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #e11d48;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--bg-surface);
}

/* چیپ پروفایل در هدر */
.panel-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.panel-user-chip:hover {
  border-color: var(--brand-teal);
}

.panel-user-chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-cyan));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-user-chip-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.panel-user-chip-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-primary);
}

.panel-user-chip-role {
  font-size: 0.68rem;
  color: var(--text-secondary);
}

.panel-back-site-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--brand-teal);
  border: 1.5px solid var(--brand-teal);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s ease;
}
.panel-back-site-btn:hover {
  background: var(--brand-teal);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   ۲. چیدمان ستونی و سایدبار
   -------------------------------------------------------------------------- */
.panel-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  gap: 24px;
  padding: 24px 20px 60px;
  align-items: start;
}

/* سایدبار دسکتاپ */
.panel-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 14px;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* کارت دانش‌پذیر در بالای سایدبار */
.sidebar-user-card {
  text-align: center;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-avatar-wrapper {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 10px;
}

.sidebar-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.25);
  border: 3px solid var(--bg-surface);
}

.sidebar-status-dot {
  position: absolute;
  bottom: 2px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid var(--bg-surface);
}

.sidebar-user-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0;
}

.sidebar-user-major {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.sidebar-badge-active {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.25);
}
[data-theme="dark"] .sidebar-badge-active {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

/* منوی سایدبار */
.panel-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.panel-nav-item {
  position: relative;
}

.panel-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.panel-nav-link-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-nav-link svg {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.panel-nav-link:hover {
  background: rgba(13, 148, 136, 0.06);
  color: var(--brand-teal);
}

.panel-nav-item.active > .panel-nav-link {
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand-teal);
  font-weight: 800;
  border-right: 3px solid var(--brand-teal);
}
[data-theme="dark"] .panel-nav-item.active > .panel-nav-link {
  background: rgba(20, 184, 166, 0.18);
  color: var(--brand-cyan);
  border-right-color: var(--brand-cyan);
}

.panel-nav-badge {
  background: var(--brand-teal);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
}

/* زیرمنوی مشخصات */
.panel-submenu {
  list-style: none;
  padding: 4px 18px 4px 0;
  margin: 4px 0 0 0;
  display: none;
  flex-direction: column;
  gap: 4px;
  border-right: 2px solid var(--border-color);
  margin-right: 20px;
}

.panel-nav-item.open > .panel-submenu {
  display: flex;
}

.panel-submenu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}
.panel-submenu-link:hover {
  color: var(--brand-teal);
}
.panel-submenu-item.active > .panel-submenu-link {
  color: var(--brand-teal);
  font-weight: 800;
  background: rgba(13, 148, 136, 0.08);
}

.panel-nav-arrow {
  transition: transform 0.25s ease;
}
.panel-nav-item.open .panel-nav-arrow {
  transform: rotate(180deg);
}

/* دکمه خروج */
.panel-logout-item {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}
.panel-logout-link {
  color: #e11d48 !important;
}
.panel-logout-link:hover {
  background: rgba(225, 29, 72, 0.08) !important;
}

/* --------------------------------------------------------------------------
   ۳. محتوای اصلی و بخش‌ها
   -------------------------------------------------------------------------- */
.panel-main-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  min-height: 600px;
}

.panel-section {
  display: none;
  animation: panelFadeIn 0.3s ease forwards;
}

.panel-section.active {
  display: block;
}

@keyframes panelFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header-box {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px 0;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   ۴. داشبورد (صفحه پیش‌فرض)
   -------------------------------------------------------------------------- */
.dashboard-welcome-banner {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.14) 0%, rgba(20, 184, 166, 0.05) 100%);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-welcome-content h2 {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-teal);
  margin: 0 0 6px 0;
}

.dashboard-welcome-content p {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.dashboard-quick-chips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.dashboard-chip-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s ease;
}
.dashboard-chip-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-teal);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}

.dashboard-chip-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dashboard-chip-icon.teal {
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand-teal);
}
.dashboard-chip-icon.cyan {
  background: rgba(20, 184, 166, 0.12);
  color: var(--brand-cyan);
}
.dashboard-chip-icon.gold {
  background: rgba(234, 179, 8, 0.12);
  color: #b45309;
}
[data-theme="dark"] .dashboard-chip-icon.gold {
  color: #fbbf24;
}

.dashboard-chip-meta {
  display: flex;
  flex-direction: column;
}

.dashboard-chip-value {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.dashboard-chip-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.dashboard-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 24px;
}

.dashboard-box-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-box-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
}

.schedule-tabs-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-color);
}

.schedule-tab-btn {
  padding: 8px 16px;
  border-radius: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.schedule-tab-btn:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
}
.schedule-tab-btn.active {
  background: var(--brand-teal);
  color: #ffffff;
  border-color: var(--brand-teal);
}

.schedule-content-panel {
  display: none;
}
.schedule-content-panel.active {
  display: block;
}

.schedule-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-surface);
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.84rem;
}

.schedule-table th {
  background: rgba(13, 148, 136, 0.08);
  color: var(--brand-teal);
  padding: 12px 16px;
  font-weight: 800;
  border-bottom: 1px solid var(--border-color);
}
[data-theme="dark"] .schedule-table th {
  background: rgba(20, 184, 166, 0.12);
}

.schedule-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.schedule-table tr:last-child td {
  border-bottom: none;
}

.schedule-footer-action {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.channel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: all 0.2s ease;
}
.channel-card:hover {
  border-color: var(--brand-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.channel-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.channel-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.1);
  color: var(--brand-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.channel-card-meta h4 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.channel-card-meta p {
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.channel-card-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--brand-teal);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}
.channel-card-btn:hover {
  background: var(--brand-teal);
  color: #fff;
}

.support-lines-box {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), transparent);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.support-lines-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.support-line-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  direction: ltr;
  transition: color 0.2s ease;
}
.support-line-link:hover {
  color: var(--brand-teal);
}
.support-line-link svg {
  color: var(--brand-teal);
}

/* --------------------------------------------------------------------------
   ۵. کلاس‌های من
   -------------------------------------------------------------------------- */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.panel-course-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
}
.panel-course-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-teal);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.panel-course-thumb {
  position: relative;
  height: 180px;
  width: 100%;
  overflow: hidden;
  background: #0f172a;
}

.panel-course-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.panel-course-card:hover .panel-course-thumb img {
  transform: scale(1.05);
}

.panel-course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(16, 185, 129, 0.92);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
}

.panel-course-major-tag {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.panel-course-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
}

.panel-course-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.45;
}

.panel-course-instructor {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.panel-course-progress-box {
  margin-top: auto;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-teal), var(--brand-cyan));
  border-radius: 10px;
  transition: width 0.4s ease;
}

.panel-course-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.panel-course-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* --------------------------------------------------------------------------
   ۶. فایل‌های قابل دانلود (آکاردئون و جدول)
   -------------------------------------------------------------------------- */
.download-accordions-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.download-accordion-item {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-primary);
  overflow: hidden;
  transition: border-color 0.2s ease;
}
.download-accordion-item.open {
  border-color: var(--brand-teal);
}

.download-accordion-header {
  width: 100%;
  padding: 16px 20px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  text-align: right;
  gap: 12px;
}

.download-accordion-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  font-weight: 800;
}

.download-accordion-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 2px 10px;
  border-radius: 14px;
}

.download-accordion-arrow {
  transition: transform 0.25s ease;
  color: var(--text-secondary);
}
.download-accordion-item.open .download-accordion-arrow {
  transform: rotate(180deg);
  color: var(--brand-teal);
}

.download-accordion-body {
  display: none;
  padding: 0 16px 16px;
}
.download-accordion-item.open .download-accordion-body {
  display: block;
}

.download-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface);
}

.download-table {
  width: 100%;
  border-collapse: collapse;
  text-align: right;
  font-size: 0.85rem;
}

.download-table th {
  background: rgba(13, 148, 136, 0.06);
  padding: 12px 14px;
  font-weight: 800;
  color: var(--brand-teal);
  border-bottom: 1px solid var(--border-color);
}

.download-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  vertical-align: middle;
}

.download-table tr:last-child td {
  border-bottom: none;
}

.download-file-name-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.download-file-icon {
  color: var(--brand-teal);
}

.download-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--brand-teal);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.download-action-btn:hover {
  opacity: 0.9;
}

.download-mobile-cards {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.download-file-mobile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.download-file-mobile-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
}

.download-file-mobile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.download-file-tag {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
}

/* --------------------------------------------------------------------------
   ۷. لایسنس‌های من
   -------------------------------------------------------------------------- */
.licenses-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.license-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.license-info h4 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.license-meta-chips {
  display: flex;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.license-key-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.license-key-box {
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: 8px;
  padding: 8px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-teal);
  letter-spacing: 1px;
  user-select: all;
  direction: ltr;
}

.copy-license-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--brand-teal);
  color: #fff;
  border: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.copy-license-btn:hover {
  background: #0f766e;
}

/* --------------------------------------------------------------------------
   ۸. نرم‌افزارهای کاربردی
   -------------------------------------------------------------------------- */
.softwares-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.software-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 22px;
}

.software-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 12px;
}

.software-title-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.software-badge {
  background: rgba(13, 148, 136, 0.12);
  color: var(--brand-teal);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 700;
}

.software-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.software-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.software-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  transition: all 0.2s ease;
}
.software-dl-btn:hover {
  border-color: var(--brand-teal);
  color: var(--brand-teal);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* --------------------------------------------------------------------------
   ۹. تیکت‌های پشتیبانی
   -------------------------------------------------------------------------- */
.ticket-actions-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.tickets-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ticket-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ticket-meta-col h4 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.ticket-info-chips {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.ticket-status-tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
}
.ticket-status-tag.success {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.ticket-status-tag.closed {
  background: rgba(148, 163, 184, 0.15);
  color: #64748b;
}

.ticket-chat-modal-box {
  max-width: 680px !important;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.ticket-chat-modal-header {
  background: var(--bg-surface);
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.ticket-chat-header-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.ticket-chat-id {
  font-family: monospace;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  padding: 2px 8px;
  border-radius: 6px;
}

.ticket-chat-dept {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand-teal);
}

.ticket-chat-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

.ticket-chat-thread {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg-primary);
  max-height: 52vh;
}

.chat-msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: 90%;
}

.chat-msg.student {
  align-self: flex-start;
}

.chat-msg.support {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.chat-msg.student .chat-msg-avatar {
  background: linear-gradient(135deg, var(--brand-teal), var(--brand-cyan));
  color: #ffffff;
}

.chat-msg.support .chat-msg-avatar {
  background: #0f172a;
  color: #38bdf8;
  border: 1px solid var(--brand-teal);
}
[data-theme="dark"] .chat-msg.support .chat-msg-avatar {
  background: #1e293b;
  color: var(--brand-cyan);
}

.chat-msg-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.chat-msg.student .chat-msg-content {
  border-top-right-radius: 4px;
  background: rgba(13, 148, 136, 0.07);
  border-color: rgba(13, 148, 136, 0.25);
}

.chat-msg.support .chat-msg-content {
  border-top-left-radius: 4px;
  border-right: 3px solid var(--brand-teal);
}

.chat-msg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
  font-size: 0.76rem;
}

.chat-msg-sender {
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-official-badge {
  background: rgba(13, 148, 136, 0.15);
  color: var(--brand-teal);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.chat-msg-time {
  color: var(--text-secondary);
  direction: rtl;
}

.chat-msg-text {
  font-size: 0.86rem;
  color: var(--text-primary);
  line-height: 1.7;
  white-space: pre-line;
  margin: 0;
}

.ticket-chat-footer {
  padding: 16px 20px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
}

.ticket-reply-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-reply-input-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.ticket-reply-textarea {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text-primary);
  resize: none;
  min-height: 60px;
  transition: border-color 0.2s;
}
.ticket-reply-textarea:focus {
  outline: none;
  border-color: var(--brand-teal);
}

.ticket-reply-send-btn {
  height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ticket-closed-notice {
  background: rgba(100, 116, 139, 0.1);
  border: 1px dashed var(--border-color);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --------------------------------------------------------------------------
   ۱۰. مشخصات و اطلاعات کاربری
   -------------------------------------------------------------------------- */
.profile-card-form {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.profile-messages-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-message-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
}
.profile-message-card.unread {
  border-right: 4px solid var(--brand-teal);
}

.profile-msg-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.profile-msg-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 6px 0;
}

.profile-msg-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* --------------------------------------------------------------------------
   ۱۱. دراور موبایل و واکنش‌گرایی
   -------------------------------------------------------------------------- */
.panel-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.panel-drawer-backdrop.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1024px) {
  .panel-layout {
    grid-template-columns: 240px 1fr;
    gap: 16px;
    padding: 16px;
  }
  .channels-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .panel-hamburger-btn {
    display: inline-flex;
  }

  .panel-header-inner {
    padding: 10px 14px;
  }

  .panel-brand-sub {
    display: none;
  }

  .panel-user-chip-role {
    display: none;
  }

  .panel-back-site-btn span {
    display: none;
  }
  .panel-back-site-btn {
    padding: 8px 10px;
  }

  .panel-layout {
    display: block;
    padding: 14px;
  }

  /* تبدیل سایدبار به دراور کشویی متحرک در موبایل */
  .panel-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    z-index: 1200;
    border-radius: 0;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .panel-sidebar.drawer-open {
    right: 0;
  }

  .panel-main-content {
    padding: 18px 14px;
    border-radius: 14px;
  }

  .channels-grid {
    grid-template-columns: 1fr;
  }

  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .download-table-wrap {
    display: none;
  }

  .download-mobile-cards {
    display: flex;
  }

  .license-card {
    flex-direction: column;
    align-items: stretch;
  }
  .license-key-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  .license-key-box {
    text-align: center;
  }
}

/* --------------------------------------------------------------------------
   بخش اختصاصی امور مالی و چک‌های اقساطی در پنل کاربری
   -------------------------------------------------------------------------- */
.dashboard-installment-banner {
  background: linear-gradient(135deg, rgba(0, 104, 114, 0.08) 0%, rgba(0, 205, 211, 0.12) 100%);
  border: 1.5px solid var(--brand-teal);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

[data-theme="dark"] .dashboard-installment-banner {
  background: linear-gradient(135deg, rgba(0, 77, 84, 0.3) 0%, rgba(0, 205, 211, 0.1) 100%);
  border-color: var(--brand-cyan);
}

.dashboard-inst-banner-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 280px;
}

.dashboard-inst-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-teal);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

[data-theme="dark"] .dashboard-inst-banner-icon {
  background: var(--brand-cyan);
  color: #012429;
}

.dashboard-inst-banner-title {
  font-size: 0.96rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0 0 4px 0;
}

.dashboard-inst-banner-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.inst-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 960px) {
  .inst-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .inst-stats-grid {
    grid-template-columns: 1fr;
  }
}

.inst-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.inst-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.inst-stat-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.inst-stat-value {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--brand-teal);
}

[data-theme="dark"] .inst-stat-value {
  color: var(--brand-cyan);
}

.inst-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

.inst-stat-badge.success {
  background: #ecfdf5;
  color: #047857;
}

.inst-stat-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.inst-guide-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 26px;
}

.inst-guide-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-teal);
  margin-bottom: 14px;
}

[data-theme="dark"] .inst-guide-heading {
  color: var(--brand-cyan);
}

.inst-steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .inst-steps-row {
    grid-template-columns: 1fr;
  }
}

.inst-step-card {
  background: var(--bg-elevated);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inst-step-badge-num {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--brand-teal);
  background: var(--brand-cyan-light);
  padding: 2px 8px;
  border-radius: 6px;
  width: fit-content;
}

[data-theme="dark"] .inst-step-badge-num {
  color: var(--brand-cyan);
  background: rgba(0, 205, 211, 0.12);
}

.inst-step-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
}

.inst-step-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.inst-checks-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
}

@media (max-width: 860px) {
  .inst-checks-grid {
    grid-template-columns: 1fr;
  }
}

.inst-check-card {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.inst-check-card.uploaded {
  border-color: #10b981;
}

.inst-check-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.inst-check-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inst-check-num-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-teal);
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inst-check-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.inst-check-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.inst-check-status-badge.pending {
  background: #fef3c7;
  color: #b45309;
}

.inst-check-status-badge.uploaded {
  background: #ecfdf5;
  color: #047857;
}

.inst-check-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elevated);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
}

.inst-check-meta-row strong {
  color: var(--brand-teal);
  font-size: 0.95rem;
}

[data-theme="dark"] .inst-check-meta-row strong {
  color: var(--brand-cyan);
}

.inst-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-elevated);
  transition: all 0.2s ease;
  position: relative;
}

.inst-dropzone:hover {
  border-color: var(--brand-teal);
  background: rgba(0, 104, 114, 0.04);
}

.inst-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.inst-dropzone-icon {
  color: var(--brand-teal);
  margin-bottom: 6px;
}

[data-theme="dark"] .inst-dropzone-icon {
  color: var(--brand-cyan);
}

.inst-dropzone-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.inst-dropzone-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.inst-image-preview-wrap {
  margin-top: 10px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.inst-image-preview {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.inst-remove-preview-btn {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(225, 29, 72, 0.85);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.inst-delivery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inst-delivery-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--brand-teal);
}

[data-theme="dark"] .inst-delivery-header {
  color: var(--brand-cyan);
}

.inst-delivery-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

@media (max-width: 768px) {
  .inst-delivery-grid {
    grid-template-columns: 1fr;
  }
}

.inst-address-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.inst-tracking-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.inst-tracking-input-wrap {
  display: flex;
  gap: 8px;
}

.inst-tracking-input-wrap input {
  flex: 1;
}

/* --------------------------------------------------------------------------
   ۱۲. استایل‌های اختصاصی رسید الکترونیکی پرداخت پیش‌پرداخت (Payment Receipt)
   -------------------------------------------------------------------------- */
.inst-receipt-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--brand-teal-light, rgba(13, 148, 136, 0.1));
  color: var(--brand-teal, #0d9488);
  border: 1px solid var(--brand-teal, #0d9488);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.inst-receipt-btn:hover {
  background: var(--brand-teal, #0d9488);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(13, 148, 136, 0.25);
}

.receipt-modal-box {
  max-width: 500px;
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: var(--bg-surface, #ffffff);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  margin: auto;
  overflow: hidden;
}

.receipt-modal-box .panel-modal-header {
  padding: 8px 14px;
  flex-shrink: 0;
}

.receipt-modal-box .panel-modal-header h3 {
  font-size: 0.88rem;
}

.receipt-modal-box .panel-modal-body {
  padding: 8px 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  -webkit-overflow-scrolling: touch;
}

.receipt-paper {
  background: var(--bg-primary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 10px;
  padding: 8px 10px;
  position: relative;
  overflow: hidden;
}

.receipt-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.receipt-logo-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.receipt-logo-img {
  height: 24px;
  width: auto;
  object-fit: contain;
}

.receipt-institute-info strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  line-height: 1.2;
}

.receipt-institute-info span {
  font-size: 0.63rem;
  color: var(--text-muted, #64748b);
}

.receipt-badge-status {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.receipt-badge-success {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  font-size: 0.66rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
}

.receipt-doc-no {
  font-size: 0.63rem;
  font-weight: 700;
  color: var(--text-secondary, #475569);
  font-family: monospace;
  direction: ltr;
}

.receipt-divider {
  height: 1px;
  background: var(--border-color, #e2e8f0);
  margin: 5px 0;
  position: relative;
}

.receipt-divider::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40px;
  height: 2px;
  background: var(--brand-teal, #0d9488);
}

.receipt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 6px;
  margin-bottom: 5px;
}

@media (max-width: 480px) {
  .receipt-grid {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

.receipt-item {
  display: flex;
  flex-direction: column;
  gap: 0px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 5px;
  padding: 3px 6px;
}

.receipt-item-wide {
  grid-column: 1 / -1;
}

.receipt-item-label {
  font-size: 0.6rem;
  color: var(--text-muted, #64748b);
  font-weight: 600;
}

.receipt-item-val {
  font-size: 0.72rem;
  color: var(--text-primary, #0f172a);
  font-weight: 700;
  line-height: 1.25;
}

.receipt-amount-highlight {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.08), rgba(16, 185, 129, 0.12));
  border: 1.5px solid var(--brand-teal, #0d9488);
  border-radius: 7px;
  padding: 5px 8px;
  text-align: center;
  margin-bottom: 5px;
}

.receipt-amount-label {
  font-size: 0.67rem;
  font-weight: 700;
  color: var(--brand-teal, #0d9488);
  margin-bottom: 0px;
}

.receipt-amount-val {
  font-size: 1.05rem;
  font-weight: 900;
  color: #065f46;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.receipt-amount-words {
  font-size: 0.65rem;
  color: var(--text-secondary, #475569);
  margin-top: 1px;
  font-weight: 600;
}

.receipt-installment-note {
  background: var(--bg-surface, #ffffff);
  border-right: 3px solid var(--brand-cyan, #0284c7);
  border-radius: 0 5px 5px 0;
  padding: 4px 7px;
  font-size: 0.65rem;
  line-height: 1.45;
  color: var(--text-secondary, #475569);
  margin-bottom: 5px;
}

.receipt-installment-note strong {
  color: var(--text-primary, #0f172a);
  display: inline-block;
  margin-left: 3px;
}

.receipt-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-top: 1px dashed var(--border-color, #e2e8f0);
  padding-top: 4px;
  flex-wrap: wrap;
}

.receipt-barcode-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.receipt-barcode-visual {
  font-family: monospace;
  letter-spacing: 2px;
  font-size: 0.78rem;
  color: var(--text-primary, #0f172a);
  font-weight: 900;
  opacity: 0.8;
}

.receipt-barcode-text {
  font-size: 0.55rem;
  color: var(--text-muted, #64748b);
  letter-spacing: 0.6px;
  font-family: monospace;
  direction: ltr;
}

.receipt-seal-wrap {
  display: flex;
  align-items: center;
}

.receipt-seal {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1.5px dashed var(--brand-teal, #0d9488);
  border-radius: 12px;
  padding: 2px 7px;
  color: var(--brand-teal, #0d9488);
  font-size: 0.64rem;
  font-weight: 800;
  background: rgba(13, 148, 136, 0.05);
}

.receipt-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 14px;
  border-top: 1px solid var(--border-color, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  flex-shrink: 0;
}

.receipt-modal-footer .btn {
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

@media print {
  body * {
    visibility: hidden !important;
  }
  #payment-receipt-modal,
  #payment-receipt-modal * {
    visibility: visible !important;
  }
  #payment-receipt-modal {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: #ffffff !important;
    padding: 0 !important;
    backdrop-filter: none !important;
  }
  .receipt-modal-box {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
    padding: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }
  .panel-modal-header,
  .receipt-modal-actions,
  .receipt-modal-footer {
    display: none !important;
  }
  .receipt-paper {
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    padding: 24px !important;
    margin: 20px auto !important;
    max-width: 700px !important;
  }
}

.installment-pending-courses-box {
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

[data-theme="dark"] .installment-pending-courses-box {
  background: #1e293b;
  border-color: rgba(245, 158, 11, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.pending-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.05));
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  flex-wrap: wrap;
  gap: 12px;
}

.pending-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 30px;
}

[data-theme="dark"] .pending-status-pill {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.pending-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  animation: pendingPulse 1.8s infinite;
}

@keyframes pendingPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pending-order-code {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-secondary, #64748b);
  letter-spacing: 0.5px;
}

.pending-box-body {
  padding: 24px;
}

.pending-package-title {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  margin: 0 0 10px 0;
  line-height: 1.5;
}

.pending-package-desc {
  font-size: 0.88rem;
  color: var(--text-secondary, #475569);
  line-height: 1.75;
  margin: 0 0 20px 0;
}

.activation-steps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-secondary, #f8fafc);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

[data-theme="dark"] .activation-steps-row {
  background: #0f172a;
  border-color: #334155;
}

.activation-step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 200px;
}

.activation-step-item .step-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.86rem;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.activation-step-item.step-done .step-circle {
  background: #ecfdf5;
  color: #059669;
  border: 1.5px solid #10b981;
}

.activation-step-item.step-current .step-circle {
  background: #fffbeb;
  color: #d97706;
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.activation-step-item.step-locked .step-circle {
  background: #f1f5f9;
  color: #94a3b8;
  border: 1.5px solid #cbd5e1;
}

[data-theme="dark"] .activation-step-item.step-done .step-circle {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

[data-theme="dark"] .activation-step-item.step-current .step-circle {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

[data-theme="dark"] .activation-step-item.step-locked .step-circle {
  background: rgba(148, 163, 184, 0.1);
  color: #64748b;
  border-color: #475569;
}

.activation-step-item .step-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.activation-step-item .step-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
}

.activation-step-item .step-sub {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
}

.activation-step-arrow {
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  opacity: 0.6;
}

.pending-actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.btn-goto-installments {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--brand-teal, #0d9488), #0f766e);
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-goto-installments:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

.btn-receipt-view {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--border-color, #cbd5e1);
  color: var(--text-primary, #1e293b);
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-receipt-view:hover {
  background: var(--bg-surface-secondary, #f8fafc);
  border-color: var(--brand-teal, #0d9488);
  color: var(--brand-teal, #0d9488);
}

[data-theme="dark"] .btn-receipt-view {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}

.secretariat-sim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: rgba(13, 148, 136, 0.05);
  border: 1.5px dashed var(--brand-teal, #0d9488);
  border-radius: 12px;
  padding: 12px 18px;
  flex-wrap: wrap;
}

[data-theme="dark"] .secretariat-sim-bar {
  background: rgba(13, 148, 136, 0.1);
  border-color: #14b8a6;
}

.sim-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--brand-teal, #0d9488);
}

[data-theme="dark"] .sim-label {
  color: #2dd4bf;
}

.btn-approve-checks-sim {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #059669;
  color: #ffffff;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.btn-approve-checks-sim:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-revert-sim {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-revert-sim:hover {
  background: #e2e8f0;
  color: #1e293b;
}

[data-theme="dark"] .btn-revert-sim {
  background: #334155;
  border-color: #475569;
  color: #cbd5e1;
}

.inst-verified-courses-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.05));
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.inst-verified-courses-alert .alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inst-verified-courses-alert .alert-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.inst-verified-courses-alert .alert-text strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: #065f46;
}

[data-theme="dark"] .inst-verified-courses-alert .alert-text strong {
  color: #34d399;
}

.inst-verified-courses-alert .alert-text span {
  font-size: 0.8rem;
  color: var(--text-secondary, #475569);
}

.inst-verification-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.inst-verification-status-banner.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.04));
  border: 1.5px solid rgba(245, 158, 11, 0.35);
}

.inst-verification-status-banner.success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.04));
  border: 1.5px solid rgba(16, 185, 129, 0.35);
}

.banner-right-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 260px;
}

.banner-badge-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #b45309;
  margin-bottom: 2px;
}

.banner-badge-indicator.ok {
  color: #059669;
}

[data-theme="dark"] .banner-badge-indicator {
  color: #fbbf24;
}

[data-theme="dark"] .banner-badge-indicator.ok {
  color: #34d399;
}

.banner-badge-indicator .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
  animation: pendingPulse 1.8s infinite;
}

.banner-right-content h4 {
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  margin: 0;
}

.banner-right-content p {
  font-size: 0.84rem;
  color: var(--text-secondary, #475569);
  line-height: 1.65;
  margin: 0;
}

.banner-left-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.locked-section-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  background: var(--bg-surface, #ffffff);
  border: 1.5px dashed rgba(245, 158, 11, 0.4);
  border-radius: 18px;
  padding: 40px 24px;
  max-width: 640px;
  margin: 24px auto;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.06);
}

[data-theme="dark"] .locked-section-notice {
  background: #1e293b;
  border-color: rgba(245, 158, 11, 0.35);
}

.locked-notice-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

[data-theme="dark"] .locked-notice-icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.locked-section-notice h3 {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-primary, #0f172a);
  margin: 0;
}

.locked-section-notice p {
  font-size: 0.86rem;
  color: var(--text-secondary, #475569);
  line-height: 1.7;
  margin: 0;
}

/* ==========================================================================
   استایل‌های اختصاصی اعلان Toast و مودال عمومی در پنل
   ========================================================================== */
.panel-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--bg-surface);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  white-space: nowrap;
}
.panel-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.panel-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  z-index: 2000;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  box-sizing: border-box;
}
.panel-modal-backdrop.active,
.panel-modal-backdrop[style*="display: flex"] {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.panel-modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin: auto;
  animation: modalScale 0.25s ease forwards;
}
@keyframes modalScale {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.panel-modal-header {
  flex-shrink: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-primary);
  margin: 0;
}
.panel-modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.panel-modal-close-btn:hover {
  color: #e11d48;
}
.panel-modal-body {
  padding: 16px 20px;
  flex: 1 1 auto;
  overflow-y: auto;
}
