/* ============================================================
   سامانه آنلاین آزمون‌های غیرحضوری
   فایل: assets/css/main.css
   فونت: Vazirmatn (فارسی حرفه‌ای)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ───────────────────────────────────────── */
:root {
  --primary:      #1a5fb4;
  --primary-dark: #0d3c8a;
  --primary-light:#3584e4;
  --accent:       #e67e22;
  --accent-dark:  #ca6f1e;
  --success:      #26a69a;
  --danger:       #e53935;
  --warning:      #f9a825;
  --info:         #29b6f6;
  --dark:         #1a1f2e;
  --gray-900:     #212529;
  --gray-700:     #495057;
  --gray-500:     #adb5bd;
  --gray-200:     #e9ecef;
  --gray-100:     #f8f9fa;
  --white:        #ffffff;

  --sidebar-w:    260px;
  --header-h:     64px;
  --radius:       10px;
  --radius-lg:    16px;
  --shadow:       0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.14);
  --transition:   all .22s ease;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  color: var(--gray-900);
  background: #f0f4f8;
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; }

/* ─── Typography ──────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.4; }
.text-primary { color: var(--primary) !important; }
.text-accent  { color: var(--accent)  !important; }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-weight: 600;
  border-radius: 8px;
  padding: .5rem 1.25rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.btn-primary   { background: var(--primary);   color:#fff; }
.btn-primary:hover { background: var(--primary-dark); color:#fff; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,95,180,.35); }
.btn-accent    { background: var(--accent);    color:#fff; }
.btn-accent:hover { background: var(--accent-dark); color:#fff; transform: translateY(-1px); }
.btn-outline-primary { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-success   { background: var(--success); color:#fff; }
.btn-danger    { background: var(--danger);  color:#fff; }
.btn-light     { background: var(--gray-100); color: var(--gray-900); border: 1px solid var(--gray-200); }
.btn-lg { padding: .75rem 1.75rem; font-size: 1.05rem; }
.btn-sm { padding: .3rem .85rem; font-size: .85rem; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ─── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: none;
  overflow: hidden;
}
.card-header {
  background: var(--white);
  border-bottom: 2px solid var(--gray-200);
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 1.05rem;
}
.card-body   { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; background: var(--gray-100); border-top: 1px solid var(--gray-200); }

/* ─── Forms ───────────────────────────────────────────────── */
.form-control, .form-select {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  border-radius: 8px;
  border: 1.5px solid #d0d7e2;
  padding: .6rem 1rem;
  font-size: .95rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-900);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,95,180,.15);
  outline: none;
}
.form-control.is-invalid { border-color: var(--danger); }
.form-label { font-weight: 600; margin-bottom: .35rem; font-size: .92rem; color: var(--gray-700); }
.invalid-feedback { color: var(--danger); font-size: .82rem; }

/* ─── Alerts ──────────────────────────────────────────────── */
.alert {
  border-radius: var(--radius);
  padding: .85rem 1.2rem;
  font-size: .92rem;
  border: none;
  border-right: 4px solid transparent;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-color: var(--success); }
.alert-danger  { background: #fce4ec; color: #b71c1c; border-color: var(--danger); }
.alert-warning { background: #fff8e1; color: #e65100; border-color: var(--warning); }
.alert-info    { background: #e1f5fe; color: #01579b; border-color: var(--info); }

/* ─── Badges ──────────────────────────────────────────────── */
.badge {
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  font-weight: 600;
  font-size: .78rem;
  padding: .28em .65em;
  border-radius: 5px;
}
.badge-primary { background: #dbeafe; color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: var(--gray-200); color: var(--gray-700); }

/* ─── Tables ──────────────────────────────────────────────── */
.table-custom { width: 100%; border-collapse: collapse; }
.table-custom th {
  background: var(--gray-100);
  padding: .75rem 1rem;
  font-weight: 700;
  font-size: .88rem;
  color: var(--gray-700);
  text-align: right;
  border-bottom: 2px solid var(--gray-200);
}
.table-custom td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-size: .92rem;
  vertical-align: middle;
}
.table-custom tr:hover td { background: #f0f6ff; }
.table-custom tr:last-child td { border-bottom: none; }

/* ─── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; list-style: none; }
.pagination .page-item .page-link {
  border-radius: 7px;
  padding: .4rem .75rem;
  font-size: .88rem;
  color: var(--primary);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ─── Stat Cards (Home / Dashboard) ──────────────────────── */
.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-icon {
  width: 58px; height: 58px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.stat-icon.blue   { background: #dbeafe; color: var(--primary); }
.stat-icon.green  { background: #d1fae5; color: var(--success); }
.stat-icon.orange { background: #ffedd5; color: var(--accent); }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-value { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .85rem; color: var(--gray-500); margin-top: .25rem; }

/* ─── Sidebar Layout ──────────────────────────────────────── */
.layout-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--dark);
  height: 100vh;
  position: fixed;
  right: 0; top: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .3s ease;
  overflow: hidden;
}
.sidebar-brand {
  padding: 1.5rem 1.2rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.sidebar-brand-logo {
  width: 40px; height: 40px;
  background: var(--primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff;
  flex-shrink: 0;
}
.sidebar-brand-text { font-size: .85rem; font-weight: 700; color: #fff; line-height: 1.3; }
.sidebar-year {
  font-size: .72rem;
  color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  padding: .15rem .5rem;
  border-radius: 4px;
  margin-top: .3rem;
  display: inline-block;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
.sidebar-nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.3); }
.sidebar-nav ul { list-style: none; }
.sidebar-section {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  padding: 1rem 1.4rem .4rem;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.4rem;
  color: rgba(255,255,255,.7);
  font-size: .92rem;
  font-weight: 500;
  transition: var(--transition);
  border-right: 3px solid transparent;
}
.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(255,255,255,.07);
  color: #fff;
  border-right-color: var(--primary-light);
}
.sidebar-nav li a .icon {
  width: 22px;
  text-align: center;
  font-size: 1rem;
  opacity: .8;
}
.sidebar-nav li a.active .icon { opacity: 1; }

.sidebar-footer {
  padding: 1rem 1.2rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem;
  border-radius: 8px;
  transition: var(--transition);
}
.sidebar-user:hover { background: rgba(255,255,255,.07); }
.sidebar-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: .9rem;
  flex-shrink: 0;
  overflow: hidden;
}
.sidebar-user-name { font-size: .85rem; font-weight: 600; color: #fff; line-height: 1.2; }
.sidebar-user-role { font-size: .72rem; color: rgba(255,255,255,.45); }

/* ─── Main Content Area ───────────────────────────────────── */
.main-content {
  margin-right: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--header-h);
  background: var(--white);
  box-shadow: 0 1px 0 var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.topbar-actions { display: flex; align-items: center; gap: .75rem; }
.page-content { flex: 1; padding: 1.75rem; }

/* ─── Home Page ───────────────────────────────────────────── */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, #1a6fb4 100%);
  color: #fff;
  padding: 5rem 0 4rem;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; }
.hero-title { font-size: 2.4rem; font-weight: 800; line-height: 1.3; }
.hero-subtitle { font-size: 1.1rem; opacity: .85; margin-top: .75rem; }
.hero-year-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  backdrop-filter: blur(6px);
  padding: .4rem .9rem;
  border-radius: 50px;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1.2rem;
}
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }
.btn-hero-primary {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); color: var(--primary-dark); }
.btn-hero-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.6);
  font-weight: 600;
  padding: .75rem 2rem;
  border-radius: 50px;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
}
.btn-hero-outline:hover { background: rgba(255,255,255,.15); border-color: #fff; }

.features-section { padding: 4rem 0; }
.section-title { font-size: 1.6rem; font-weight: 800; }
.section-subtitle { color: var(--gray-500); margin-top: .4rem; }
.divider { width: 50px; height: 4px; background: var(--primary); border-radius: 2px; margin: .75rem 0 2rem; }

/* ─── Auth Pages ──────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e8f0fe 0%, #f0f4ff 100%);
  padding: 2rem 1rem;
}
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  overflow: hidden;
}
.auth-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 2rem;
  text-align: center;
  color: #fff;
}
.auth-logo {
  width: 64px; height: 64px;
  background: rgba(255,255,255,.2);
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 1rem;
}
.auth-title { font-size: 1.3rem; font-weight: 700; }
.auth-subtitle { font-size: .85rem; opacity: .8; margin-top: .3rem; }
.auth-body { padding: 2rem; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--gray-200); margin-bottom: 1.5rem; }
.auth-tab {
  flex: 1;
  padding: .65rem;
  text-align: center;
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
}
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Captcha ─────────────────────────────────────────────── */
.captcha-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.captcha-question {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border-radius: 8px;
  padding: .6rem 1.2rem;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary-dark);
  min-width: 90px;
  text-align: center;
  letter-spacing: 2px;
  user-select: none;
  border: 2px dashed #93c5fd;
}
.captcha-input { flex: 1; }

/* ─── Exam Cards ──────────────────────────────────────────── */
.exam-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 2px solid var(--gray-200);
  padding: 1.25rem;
  transition: var(--transition);
  position: relative;
}
.exam-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.exam-card .subject-badge {
  display: inline-block;
  background: #dbeafe;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 700;
  padding: .2rem .6rem;
  border-radius: 5px;
  margin-bottom: .6rem;
}
.exam-card h6 { font-size: .98rem; font-weight: 700; margin-bottom: .5rem; }
.exam-meta { font-size: .82rem; color: var(--gray-500); display: flex; flex-wrap: wrap; gap: .5rem .75rem; }
.exam-meta span { display: flex; align-items: center; gap: .3rem; }
.exam-status {
  position: absolute;
  top: 1rem; left: 1rem;
  font-size: .72rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 50px;
}
.status-active   { background: #d1fae5; color: #065f46; }
.status-upcoming { background: #dbeafe; color: #1e40af; }
.status-finished { background: var(--gray-200); color: var(--gray-700); }
.status-live     { background: #fee2e2; color: #991b1b; animation: pulse-live 1.5s infinite; }
@keyframes pulse-live {
  0%,100% { opacity:1; } 50% { opacity:.6; }
}

/* ─── Exam Taking Screen ──────────────────────────────────── */
.exam-screen { background: #f8fafc; }
.exam-topbar {
  background: var(--dark);
  color: #fff;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 99;
}
.exam-timer {
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #fff;
  background: rgba(255,255,255,.12);
  padding: .25rem .9rem;
  border-radius: 8px;
}
.exam-timer.warning { color: var(--warning); }
.exam-timer.danger  { color: var(--danger); animation: pulse-live 1s infinite; }
.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.question-number {
  font-size: .82rem;
  font-weight: 700;
  color: var(--primary);
  background: #dbeafe;
  padding: .2rem .65rem;
  border-radius: 5px;
  margin-bottom: .75rem;
  display: inline-block;
}
.question-text { font-size: 1rem; line-height: 1.8; margin-bottom: 1.2rem; }
.option-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 9px;
  margin-bottom: .5rem;
  cursor: pointer;
  transition: var(--transition);
}
.option-item:hover { border-color: var(--primary-light); background: #f0f6ff; }
.option-item.selected { border-color: var(--primary); background: #dbeafe; }
.option-item input[type="radio"] { margin-top: .25rem; accent-color: var(--primary); }
.option-letter {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: var(--transition);
}
.option-item.selected .option-letter { background: var(--primary); color: #fff; }

.question-nav {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
  gap: .4rem;
}
.q-nav-btn {
  height: 38px;
  border: 2px solid var(--gray-200);
  border-radius: 7px;
  background: var(--white);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.q-nav-btn:hover    { border-color: var(--primary); }
.q-nav-btn.answered { background: var(--primary); color: #fff; border-color: var(--primary); }
.q-nav-btn.current  { border-color: var(--accent); color: var(--accent); }

/* ─── Modal ───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.2);
  transform: translateY(20px);
  transition: transform .25s;
}
.modal-backdrop.open .modal-box { transform: translateY(0); }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h5 { font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  font-size: 1rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.modal-body { padding: 1.5rem; }

/* ─── Schedule Table (Modal) ──────────────────────────────── */
.schedule-table th { background: var(--gray-100); }
.schedule-today { background: #fffbeb !important; }
.schedule-today td:first-child { border-right: 3px solid var(--warning); }

/* ─── Profile Image ───────────────────────────────────────── */
.profile-img {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gray-200);
}
.profile-img-placeholder {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #fff;
  border: 3px solid var(--gray-200);
}

/* ─── Scorecard (کارنامه) ─────────────────────────────────── */
.scorecard-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.score-circle {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 1rem auto;
  border: 3px solid rgba(255,255,255,.4);
}
.answer-row-correct   { background: #f0fff4 !important; }
.answer-row-incorrect { background: #fff5f5 !important; }

/* ─── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast notifications ─────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.toast {
  background: var(--dark);
  color: #fff;
  padding: .75rem 1.2rem;
  border-radius: 10px;
  font-size: .9rem;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: .6rem;
  animation: slideUp .3s ease;
}
.toast.success { border-right: 4px solid var(--success); }
.toast.error   { border-right: 4px solid var(--danger);  }
.toast.info    { border-right: 4px solid var(--info);    }
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(100%); height: 100vh; max-height: 100vh; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-right: 0; }
  .hero-title { font-size: 1.6rem; }
  .page-content { padding: 1rem; }
}

/* ─── Utilities ───────────────────────────────────────────── */
.rounded-full { border-radius: 50%; }
.cursor-pointer { cursor: pointer; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.gap-2  { gap: .5rem; }
.gap-3  { gap: .75rem; }
.fs-sm  { font-size: .85rem; }
.fs-xs  { font-size: .78rem; }
.text-muted { color: var(--gray-500) !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.mb-0 { margin-bottom: 0 !important; }
.mt-auto { margin-top: auto; }

/* ─── Print (برای PDF) ────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main-content { margin-right: 0; }
  body { background: #fff; }
}
