@import url('https://cdn.fontcdn.ir/Font/Persian/Vazir/Vazir.css');

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg-gradient-start: #1e293b;
  --bg-gradient-end: #0f172a;
}

* {
  font-family: 'Vazir', Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

body {
  background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* کارت‌های داشبورد و ورود */
.dashboard-card,
.login-card {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.dashboard-card::-webkit-scrollbar,
.login-card::-webkit-scrollbar {
  width: 6px;
}

.dashboard-card::-webkit-scrollbar-track,
.login-card::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-card::-webkit-scrollbar-thumb,
.login-card::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
}

/* کارت آمار */
.stat-card {
  background: rgba(17, 24, 39, 0.7);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* انیمیشن حلقه پیشرفت */
.progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

/* اشکال شناور */
.floating-shapes div {
  position: fixed;
  border-radius: 50%;
  opacity: 0.15;
  z-index: -1;
}

.shape1 {
  width: 300px;
  height: 300px;
  background: #3b82f6;
  top: -100px;
  right: -100px;
  filter: blur(90px);
}

.shape2 {
  width: 200px;
  height: 200px;
  background: #10b981;
  bottom: -50px;
  left: -50px;
  filter: blur(70px);
}

.shape3 {
  width: 150px;
  height: 150px;
  background: #8b5cf6;
  top: 40%;
  left: 60%;
  filter: blur(60px);
}

/* اشکال شناور برای صفحه ورود با رنگ متفاوت */
.login-card + .floating-shapes div.shape1 {
  background: #8b5cf6;
  opacity: 0.2;
  position: absolute;
}

.login-card + .floating-shapes div.shape2 {
  background: #3b82f6;
  opacity: 0.2;
  position: absolute;
}

.login-card + .floating-shapes div.shape3 {
  background: #ec4899;
  opacity: 0.2;
  position: absolute;
}

/* انیمیشن پالسی */
@keyframes pulse {
  0%, 100% { opacity: 0.8; }
  50% { opacity: 0.5; }
}

.loading-pulse {
  animation: pulse 1.5s infinite;
}

/* ردیف داده‌ها */
.data-row {
  transition: all 0.3s ease;
}

.data-row:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* دکمه خروج */
.exit-btn {
  transition: all 0.3s ease;
}

.exit-btn:hover {
  background-color: #b91c1c;
  transform: translateY(-2px);
}

/* هدر چسبان */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* بخش تایم‌لاین (ltr) */
.timeline-section {
  direction: ltr;
}

.time-marker {
  position: absolute;
  top: -20px;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
}

.time-marker::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  height: 8px;
  width: 1px;
  background-color: #475569;
}

/* فرم ورودی‌ها */
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.3);
}

/* دکمه‌ها */
.btn-primary {
  background-color: var(--primary);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

/* پیام خطا */
.error-message {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
