 /* ─── متغیرهای رنگ ─────────────────────────────── */
:root {
  --primary:      #2E75B6;
  --primary-dark: #1F4E79;
  --success:      #375623;
  --accent:       #ED7D31;
  --bg:           #F0F4F8;
  --card-bg:      #FFFFFF;
  --text:         #2D3748;
  --text-muted:   #718096;
  --border:       #E2E8F0;
  --shadow:       0 4px 20px rgba(0,0,0,.08);
  --radius:       14px;
  --transition:   all .25s ease;
}

/* ─── Base ──────────────────────────────────────── */
body {
  background: var(--bg);
  font-family: 'Tahoma', sans-serif;
  color: var(--text);
  min-height: 100vh;
}

/* ─── Navbar ────────────────────────────────────── */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary)) !important;
  box-shadow: 0 2px 20px rgba(30,78,121,.3);
  padding: .8rem 0;
}

.navbar-brand {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-link {
  font-weight: 500;
  border-radius: 8px;
  padding: .4rem .8rem !important;
  transition: var(--transition);
}

.nav-link:hover {
  background: rgba(255,255,255,.15);
  transform: translateY(-1px);
}

/* ─── Cards ─────────────────────────────────────── */
.card {
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow);
  transition: var(--transition);
  background: var(--card-bg);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.course-card .card-img-top {
  border-radius: var(--radius) var(--radius) 0 0;
  height: 180px;
  object-fit: cover;
}

/* ─── Buttons ───────────────────────────────────── */
.btn {
  border-radius: 10px !important;
  font-weight: 500;
  transition: var(--transition);
  padding: .45rem 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: none;
  box-shadow: 0 4px 12px rgba(46,117,182,.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(46,117,182,.45);
  background: linear-gradient(135deg, var(--primary-dark), #163a5c);
}

.btn-success {
  background: linear-gradient(135deg, #28a745, #1e7e34);
  border: none;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(40,167,69,.4);
}

/* ─── Forms ─────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px !important;
  border: 2px solid var(--border);
  padding: .6rem 1rem;
  transition: var(--transition);
  font-family: 'Tahoma', sans-serif;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46,117,182,.15);
}

/* ─── Badges ────────────────────────────────────── */
.badge {
  border-radius: 8px !important;
  font-weight: 500;
  padding: .35em .7em;
}

.badge-student { background: #dbeafe; color: #1d4ed8; }
.badge-teacher { background: #d1fae5; color: #065f46; }
.badge-admin   { background: #fee2e2; color: #991b1b; }

/* ─── Dashboard Stat Cards ──────────────────────── */
.stat-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  transition: var(--transition);
}

.stat-card:hover { transform: scale(1.03); }
.stat-card.green { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stat-card.orange { background: linear-gradient(135deg, var(--accent), #c05e1a); }

/* ─── Notification Bell ─────────────────────────── */
.notif-badge {
  position: absolute;
  top: -6px; right: -6px;
  background: #ef4444;
  color: white;
  border-radius: 50%;
  width: 18px; height: 18px;
  font-size: .65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* ─── Notification Items ────────────────────────── */
.notif-item {
  border-right: 4px solid transparent;
  transition: var(--transition);
  border-radius: var(--radius) !important;
}
.notif-item.unread {
  border-right-color: var(--primary);
  background: #EFF6FF !important;
}

.notif-item:hover { background: #F8FAFF !important; }

/* ─── Hero ──────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg,
    var(--primary-dark) 0%,
    var(--primary) 60%,
    #5ba3d9 100%);
  color: white;
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(
    circle, rgba(255,255,255,.06) 0%, transparent 60%
  );
  animation: heroGlow 6s ease-in-out infinite;
}

@keyframes heroGlow {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(30px, 20px); }
}

/* ─── Alert ─────────────────────────────────────── */
.alert {
  border: none;
  border-radius: var(--radius);
  border-right: 5px solid;
}

.alert-success { border-right-color: #28a745; }
.alert-danger  { border-right-color: #dc3545; }
.alert-warning { border-right-color: #ffc107; }
.alert-info    { border-right-color: var(--primary); }

/* ─── Page Loader ───────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity .4s ease;
}

.spinner {
  width: 48px; height: 48px;
  border: 5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

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

/* ─── Scroll to Top ─────────────────────────────── */
#scrollTop {
  position: fixed;
  bottom: 30px; left: 30px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
  z-index: 999;
  box-shadow: 0 4px 14px rgba(46,117,182,.4);
}

#scrollTop.show {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Filter Sidebar ────────────────────────────── */
.filter-sidebar {
  position: sticky;
  top: 80px;
}

/* ─── Table ─────────────────────────────────────── */
.table-custom th {
  background: var(--primary-dark);
  color: white;
  font-weight: 600;
  border: none;
}

.table-custom td {
  vertical-align: middle;
  border-color: var(--border);
}

.table-custom tbody tr:hover {
  background: #EFF6FF;
  transition: var(--transition);
}

/* ─── Progress Bar ──────────────────────────────── */
.progress {
  height: 8px;
  border-radius: 10px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary), #5ba3d9);
  border-radius: 10px;
  transition: width .8s ease;
}

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 2rem 1rem; }
  .stat-card { margin-bottom: 1rem; }
  .filter-sidebar { position: static; }
}