/* ===========================================================
   لابراتوار احسان - استایل اصلی
   فونت: Vazirmatn  |  پایه: Bootstrap 5 RTL
   =========================================================== */

:root {
  --eh-primary: #6610f2;
  --eh-primary-light: #8540f5;
  --eh-secondary: #20c997;
  --eh-bg: #f4f5fb;
  --eh-sidebar-bg: #1e1b2e;
  --eh-sidebar-bg-2: #2a2545;
  --eh-text-muted: #8a8a99;
  --eh-radius: 16px;
  --eh-shadow: 0 4px 18px rgba(40, 30, 90, 0.08);
  --eh-shadow-strong: 0 8px 28px rgba(40, 30, 90, 0.16);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: var(--eh-bg);
  color: #2c2a3d;
  font-size: 0.95rem;
}

a { text-decoration: none; }

/* ---------- لایه‌بندی اصلی ---------- */

.eh-wrapper {
  display: flex;
  min-height: 100vh;
}

.eh-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--eh-sidebar-bg) 0%, var(--eh-sidebar-bg-2) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.25rem 1rem;
}

.eh-sidebar .eh-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.25rem;
}

.eh-sidebar .eh-logo img { width: 42px; height: 42px; }

.eh-sidebar .eh-logo .title { font-weight: 800; font-size: 1.05rem; line-height: 1.3; }
.eh-sidebar .eh-logo .subtitle { font-size: 0.72rem; color: rgba(255,255,255,0.55); }

.eh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(255,255,255,0.75);
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  font-weight: 500;
  margin-bottom: 0.3rem;
  transition: all .15s ease;
}

.eh-nav-link i { font-size: 1.1rem; width: 22px; text-align: center; }

.eh-nav-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.eh-nav-link.active {
  background: linear-gradient(90deg, var(--eh-primary), var(--eh-primary-light));
  color: #fff;
  box-shadow: 0 4px 14px rgba(102,16,242,0.45);
}

.eh-nav-section-title {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 1.1rem 0.9rem 0.4rem;
}

.eh-sidebar-user {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
}

.eh-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.eh-topbar {
  background: #fff;
  border-bottom: 1px solid #ecebf3;
  padding: 0.8rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.eh-content {
  padding: 1.5rem;
  flex: 1;
}

@media (max-width: 991.98px) {
  .eh-sidebar { display: none; }
  .eh-content { padding: 1rem; }
}

/* ---------- کارت‌ها ---------- */

.eh-card {
  background: #fff;
  border-radius: var(--eh-radius);
  box-shadow: var(--eh-shadow);
  border: none;
}

.eh-stat-card {
  border-radius: var(--eh-radius);
  padding: 1.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: var(--eh-shadow);
  min-height: 120px;
}

.eh-stat-card .icon-bg {
  position: absolute;
  left: -10px;
  bottom: -16px;
  font-size: 5rem;
  opacity: 0.18;
}

.eh-stat-card .value { font-size: 1.7rem; font-weight: 800; }
.eh-stat-card .label { font-size: 0.85rem; opacity: 0.9; }

.bg-grad-purple { background: linear-gradient(135deg, #6610f2, #9b6bf3); }
.bg-grad-blue   { background: linear-gradient(135deg, #0d6efd, #5aa6ff); }
.bg-grad-green  { background: linear-gradient(135deg, #198754, #34c98a); }
.bg-grad-orange { background: linear-gradient(135deg, #fd7e14, #ffb35e); }
.bg-grad-pink   { background: linear-gradient(135deg, #d63384, #ff7ab8); }
.bg-grad-teal   { background: linear-gradient(135deg, #20c997, #6be0c2); }

.eh-stage-card {
  border-radius: 14px;
  padding: 1rem;
  color: #fff;
  box-shadow: var(--eh-shadow);
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}

.eh-stage-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--eh-shadow-strong);
}

.eh-stage-card .count { font-size: 1.6rem; font-weight: 800; }
.eh-stage-card .label { font-size: 0.8rem; opacity: 0.95; }
.eh-stage-card i { font-size: 1.5rem; opacity: 0.85; }

/* ---------- بج وضعیت ---------- */

.eh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.7rem;
  border-radius: 50px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* ---------- جداول ---------- */

.eh-table thead th {
  background: #f7f6fc;
  font-weight: 700;
  font-size: 0.8rem;
  color: #5a5575;
  border-bottom: none;
  white-space: nowrap;
}

.eh-table tbody tr {
  transition: background .12s ease;
}

.eh-table tbody tr:hover {
  background: #f8f7fd;
}

.eh-table td, .eh-table th {
  vertical-align: middle;
  padding: 0.85rem 0.9rem;
}

/* ---------- فرم‌ها ---------- */

.form-label { font-weight: 600; font-size: 0.86rem; color: #4b4763; }

.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #e3e1ee;
  padding: 0.55rem 0.85rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--eh-primary-light);
  box-shadow: 0 0 0 0.2rem rgba(102,16,242,0.15);
}

.btn {
  border-radius: 10px;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
}

.btn-primary {
  background: linear-gradient(90deg, var(--eh-primary), var(--eh-primary-light));
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(90deg, #5709d6, var(--eh-primary));
}

/* ---------- صفحه ورود ---------- */

.eh-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e1b2e 0%, #6610f2 55%, #9b6bf3 100%);
  padding: 1rem;
}

.eh-login-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 400px;
  padding: 2.25rem 2rem;
}

.eh-login-card .eh-logo-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--eh-primary), var(--eh-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 8px 22px rgba(102,16,242,0.35);
}

/* ---------- فاکتور ---------- */

.eh-invoice {
  background: #fff;
  border-radius: var(--eh-radius);
  box-shadow: var(--eh-shadow);
  padding: 2.25rem;
  max-width: 850px;
  margin: 0 auto;
}

.eh-invoice .eh-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 3px solid var(--eh-primary);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.eh-invoice table th { background: #f7f6fc; }

@media print {
  .eh-no-print { display: none !important; }
  .eh-sidebar, .eh-topbar { display: none !important; }
  .eh-content { padding: 0 !important; }
  body { background: #fff !important; }
  .eh-invoice { box-shadow: none !important; max-width: 100% !important; }
}

/* ---------- متفرقه ---------- */

.eh-progress-thin { height: 8px; border-radius: 50px; }

.eh-empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--eh-text-muted);
}

.eh-empty-state i { font-size: 3.2rem; opacity: 0.35; margin-bottom: 0.75rem; display: block; }

.eh-search-card { border-radius: var(--eh-radius); box-shadow: var(--eh-shadow); }

.eh-status-select {
  border: none;
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.3rem 1.8rem 0.3rem 0.7rem;
  background-position: left 0.6rem center;
}

.eh-pagination .page-link { border-radius: 10px; margin: 0 2px; border: none; color: #4b4763; }
.eh-pagination .page-item.active .page-link { background: var(--eh-primary); color: #fff; }
