/* ====================================
   ایران‌کار - استایل‌های پیشرفته
==================================== */

/* کلاس سفارشی برای badge قیمت ثابت */
.badge-fixed-price {
  background-color: #6c757d !important;
  color: white !important;
}

/* کلاس‌های سفارشی برای قیمت ثابت در حالت‌های مختلف */
.fixed-price-text {
  color: #198754 !important;
}

.fixed-price-bg {
  background-color: rgba(25, 135, 84, 0.1) !important;
}

/* حالت light mode - متن سیاه برای قابلیت دید بهتر */
[data-theme="light"] .fixed-price-text {
  color: #000 !important;
}

/* حالت dark mode - متن سبز */
[data-theme="dark"] .fixed-price-text {
  color: #198754 !important;
}

/* متغیرهای CSS برای تم‌ها */
:root {
  /* Light Theme */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #f59e0b;
  --success-color: #10b981;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --info-color: #3b82f6;
  
  /* Background Colors */
  --bg-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --bg-success: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --bg-gradient-main: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Surface Colors */
  --surface-color: #ffffff;
  --surface-elevated: #f8fafc;
  --surface-hover: #f1f5f9;
  --surface-border: #e2e8f0;
  
  /* Text Colors */
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  
  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  
  /* Animations */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* Dark Theme */
[data-theme="dark"] {
  /* Primary Colors - برای دارک مود رنگ‌های روشن‌تر */
  --primary-color: #8b5cf6;
  --primary-dark: #7c3aed;
  --primary-light: #a78bfa;
  
  /* Background Colors */
  --bg-primary: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 100%);
  --bg-secondary: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  --bg-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --bg-gradient-main: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  
  /* Surface Colors */
  --surface-color: #1f2937;
  --surface-elevated: #374151;
  --surface-hover: #4b5563;
  --surface-border: #4b5563;
  
  /* Text Colors */
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-inverse: #111827;
}

/* تشخیص تم سیستم عامل */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Background Colors */
    --bg-primary: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --bg-secondary: linear-gradient(135deg, #0f3460 0%, #e94560 100%);
    --bg-success: linear-gradient(135deg, #134e4a 0%, #065f46 100%);
    --bg-gradient-main: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    
    /* Surface Colors */
    --surface-color: #1e293b;
    --surface-elevated: #334155;
    --surface-hover: #475569;
    --surface-border: #475569;
    
    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-inverse: #1e293b;
  }
  
  /* Navbar toggler for system dark mode */
  :root:not([data-theme="light"]) .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  }
  
  :root:not([data-theme="light"]) .navbar-toggler {
    border-color: transparent !important;
    background: transparent !important;
  }
  
  :root:not([data-theme="light"]) .navbar-toggler:focus,
  :root:not([data-theme="light"]) .navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
  }
}

/* استایل‌های کلی */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background: var(--bg-gradient-main) !important;
  color: var(--text-primary) !important;
  transition: var(--transition-normal);
  min-height: 100vh;
  line-height: 1.6;
}

/* اصلاحات دارک مود */
/* اصلاحات کلی دارک مود */
[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] * {
  color: inherit;
}

[data-theme="dark"] body {
  background: var(--surface-elevated) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .container {
  color: #f8fafc !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, 
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
  color: #f8fafc !important;
}

[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] div {
  color: #f8fafc !important;
}

[data-theme="dark"] .text-muted {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .text-secondary {
  color: #d1d5db !important;
}

[data-theme="dark"] .text-dark {
  color: #f8fafc !important;
}

[data-theme="dark"] .text-black-50 {
  color: #9ca3af !important;
}

[data-theme="dark"] .card {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
  background: inherit !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .card-title {
  color: #f8fafc !important;
}

[data-theme="dark"] .card-text {
  color: #d1d5db !important;
}

[data-theme="dark"] .form-control, [data-theme="dark"] .form-select {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .form-control:focus, [data-theme="dark"] .form-select:focus {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25) !important;
}

[data-theme="dark"] .form-label {
  color: #f8fafc !important;
}

[data-theme="dark"] .dropdown-menu {
  background: var(--surface-elevated) !important;
  border: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #f8fafc !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background: var(--surface-hover) !important;
  color: #8b5cf6 !important;
}

[data-theme="dark"] .bg-light {
  background: var(--surface-elevated) !important;
}

[data-theme="dark"] .bg-white {
  background: var(--surface-color) !important;
}

[data-theme="dark"] .border {
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .table {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .table th {
  background: var(--surface-elevated) !important;
  color: #f8fafc !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .table td {
  color: #d1d5db !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .list-group-item {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .modal-content {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .modal-header {
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .modal-footer {
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .alert {
  color: inherit !important;
}

[data-theme="dark"] .breadcrumb {
  background: var(--surface-elevated) !important;
}

[data-theme="dark"] .breadcrumb-item {
  color: #d1d5db !important;
}

[data-theme="dark"] .breadcrumb-item.active {
  color: #f8fafc !important;
}

[data-theme="dark"] .pagination .page-link {
  background: var(--surface-color) !important;
  border-color: var(--surface-border) !important;
  color: #f8fafc !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
  background: #8b5cf6 !important;
  border-color: #8b5cf6 !important;
  color: #ffffff !important;
}

[data-theme="dark"] small {
  color: #cbd5e1 !important;
}

[data-theme="dark"] i {
  color: inherit !important;
}

[data-theme="dark"] hr {
  border-color: var(--surface-border) !important;
  opacity: 0.3;
}

/* Navbar Styles */
.navbar {
  background: var(--surface-color) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary) !important;
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background: var(--surface-elevated);
}

/* Navbar Toggler for Mobile */
.navbar-toggler {
  border: none !important;
  padding: 0.25rem 0.5rem;
  background: transparent !important;
}

.navbar-toggler:focus {
  box-shadow: none !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23333' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  width: 1.5em;
  height: 1.5em;
}

/* Dark mode navbar toggler */
[data-theme="dark"] .navbar {
  background: var(--surface-color) !important;
  border-bottom-color: var(--surface-border);
}

[data-theme="dark"] .navbar-brand {
  color: #f8fafc !important;
}

[data-theme="dark"] .navbar-nav .nav-link {
  color: #f8fafc !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover {
  color: #a78bfa !important;
  background: var(--surface-hover);
}

[data-theme="dark"] .navbar-nav .nav-link.active {
  color: #a78bfa !important;
  background: var(--surface-elevated);
}

[data-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="dark"] .navbar-toggler {
  border-color: transparent !important;
  background: transparent !important;
}

[data-theme="dark"] .navbar-toggler:focus,
[data-theme="dark"] .navbar-toggler:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* کانتینر اصلی */
.main-container {
  background: var(--surface-color);
  min-height: 100vh;
  transition: var(--transition-normal);
}

/* نوار ناوبری */
.navbar {
  background: var(--surface-color) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-border);
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.5rem;
  transition: var(--transition-fast);
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav .nav-link {
  color: var(--text-primary) !important;
  transition: var(--transition-fast);
  position: relative;
  margin: 0 0.5rem;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background: var(--surface-hover);
  transform: translateY(-2px);
}

.navbar-nav .nav-link.active {
  color: var(--primary-color) !important;
  background: var(--surface-hover);
}

/* دکمه تغییر تم - مثل nav-link */
.theme-toggle {
  background: none !important;
  border: none !important;
  color: var(--text-primary) !important;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  position: relative;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
}

.theme-toggle:hover {
  background: var(--surface-hover) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px);
}

.theme-toggle:focus {
  outline: none;
  box-shadow: none;
}

/* بخش Hero */
.hero-section {
  background: var(--bg-primary);
  color: var(--text-inverse);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
  animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(10px) translateY(10px); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  animation: slideInUp 1s ease-out;
  background: linear-gradient(45deg, #ffffff, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  animation: slideInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  animation: slideInUp 1s ease-out 0.4s both;
}

/* کارت‌ها */
.card {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  overflow: hidden;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bg-primary);
  transform: scaleX(0);
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-body {
  padding: 2rem;
}

/* مزایده کارت */
.auction-card {
  transition: var(--transition-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.auction-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: var(--transition-normal);
}

.auction-card:hover::after {
  transform: translateX(100%);
}

.auction-card:hover {
  transform: translateY(-10px) rotateY(5deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.auction-image {
  height: 220px;
  object-fit: cover;
  transition: var(--transition-slow);
}

.auction-card:hover .auction-image {
  transform: scale(1.1);
}

/* بج‌ها */
.badge {
  border-radius: 50px;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.price-badge {
  background: var(--bg-primary);
  color: var(--text-inverse);
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.price-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* دکمه‌ها */
.btn {
  border-radius: 50px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-fast);
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:active {
  transform: scale(0.95);
}

.btn-primary {
  background: var(--bg-primary);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-primary);
  color: var(--text-inverse);
}

.btn-success {
  background: var(--bg-success);
  color: var(--text-inverse);
}

.btn-success:hover {
  background: var(--bg-success);
  color: var(--text-inverse);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--text-inverse);
  border-color: var(--primary-color);
}

/* اصلاح دکمه‌ها در دارک مود */
[data-theme="dark"] .btn-primary {
  background: var(--bg-primary);
  color: white;
  border-color: var(--primary-color);
}

[data-theme="dark"] .btn-primary:hover,
[data-theme="dark"] .btn-primary:focus {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-dark);
}

[data-theme="dark"] .btn-secondary {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--surface-hover);
}

[data-theme="dark"] .btn-outline-secondary {
  color: var(--text-secondary);
  border-color: var(--surface-border);
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: var(--surface-hover);
}

[data-theme="dark"] .btn-link {
  color: var(--primary-light);
}

[data-theme="dark"] .btn-link:hover {
  color: var(--primary-color);
}

/* فیلدهای فرم */
.form-control, .form-select {
  background: var(--surface-color);
  border: 2px solid var(--surface-border);
  color: var(--text-primary);
  border-radius: var(--radius-lg);
  padding: 0.75rem 1rem;
  transition: var(--transition-fast);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
  transform: scale(1.02);
  background: var(--surface-color);
  color: var(--text-primary);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-label {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* اصلاح رنگ‌های Bootstrap در دارک مود */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: var(--surface-color);
  border-color: var(--surface-border);
  color: var(--text-primary);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: var(--surface-color);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(139, 92, 246, 0.25);
}

[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-select:disabled {
  background-color: var(--surface-hover);
  opacity: 0.6;
}

/* آمار */
.stats-card {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: center;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  opacity: 0;
  transition: var(--transition-normal);
}

.stats-card:hover {
  transform: translateY(-10px) scale(1.05);
  color: var(--text-inverse);
}

.stats-card:hover::before {
  opacity: 1;
}

.stats-card * {
  position: relative;
  z-index: 1;
}

.stats-number {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  animation: countUp 1s ease-out;
}

@keyframes countUp {
  from { transform: scale(0) rotate(180deg); }
  to { transform: scale(1) rotate(0deg); }
}

/* انیمیشن‌ها */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.animate-slideUp {
  animation: slideInUp 0.6s ease-out;
}

.animate-slideRight {
  animation: slideInRight 0.6s ease-out;
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

.animate-bounce {
  animation: bounce 1s ease-out;
}

/* Loading */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--surface-border);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* فوتر */
.footer {
  background: var(--bg-primary);
  color: var(--text-inverse);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

/* ریسپانسیو */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .stats-number {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.5rem 1.5rem;
  }
}

/* اسکرول بار سفارشی */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--surface-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* انتخاب متن */
::selection {
  background: var(--primary-color);
  color: var(--text-inverse);
}

/* فوکوس */
*:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* هاور روی لینک‌ها */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* اصلاح‌های خاص صفحه */
.page-header {
  background: var(--bg-gradient-main);
  color: var(--text-inverse);
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.sidebar {
  background: var(--surface-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.list-group-item {
  background: var(--surface-color);
  border: 1px solid var(--surface-border);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.list-group-item:hover {
  background: var(--surface-hover);
  transform: translateX(5px);
}

.list-group-item.active {
  background: var(--bg-primary);
  border-color: var(--primary-color);
}

/* پیام‌های Alert */
.alert {
  border-radius: var(--radius-lg);
  border: none;
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fcd34d 100%);
  color: #92400e;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fca5a5 100%);
  color: #991b1b;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #93c5fd 100%);
  color: #1e40af;
}

/* تنظیمات رنگ برای حالت تاریک */
[data-theme="dark"] .alert-success {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
  color: #a7f3d0;
}

[data-theme="dark"] .alert-warning {
  background: linear-gradient(135deg, #78350f 0%, #92400e 100%);
  color: #fcd34d;
}

[data-theme="dark"] .alert-danger {
  background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
  color: #fca5a5;
}

[data-theme="dark"] .alert-info {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: #93c5fd;
}

/* ========================= */
/* اصلاحات کامل دارک مود */
/* ========================= */

/* تنظیمات کلی */
[data-theme="dark"] {
  color-scheme: dark;
}

[data-theme="dark"] body {
  background: var(--surface-elevated) !important;
  color: #ffffff !important;
}

/* تمام متن‌ها */
[data-theme="dark"] * {
  color: inherit;
}

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, 
[data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
  color: #ffffff !important;
}

[data-theme="dark"] p, [data-theme="dark"] span, [data-theme="dark"] div,
[data-theme="dark"] li, [data-theme="dark"] a {
  color: #ffffff !important;
}

[data-theme="dark"] .text-muted {
  color: #cbd5e1 !important;
}

[data-theme="dark"] small {
  color: #d1d5db !important;
}

/* Footer کامل */
[data-theme="dark"] footer {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #ffffff !important;
}

[data-theme="dark"] footer h5,
[data-theme="dark"] footer p,
[data-theme="dark"] footer li,
[data-theme="dark"] footer a,
[data-theme="dark"] footer span {
  color: #ffffff !important;
}

[data-theme="dark"] footer hr {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* Navbar کامل */
[data-theme="dark"] .navbar {
  background: var(--surface-color) !important;
  border-bottom-color: var(--surface-border) !important;
}

[data-theme="dark"] .navbar-brand {
  color: #a78bfa !important;
}

[data-theme="dark"] .navbar-nav .nav-link {
  color: #ffffff !important;
}

[data-theme="dark"] .navbar-nav .nav-link:hover {
  color: #a78bfa !important;
  background: var(--surface-hover) !important;
}

[data-theme="dark"] .navbar-nav .nav-link.active {
  color: #a78bfa !important;
}

[data-theme="dark"] .dropdown-menu {
  background: var(--surface-elevated) !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .dropdown-item {
  color: #ffffff !important;
}

[data-theme="dark"] .dropdown-item:hover {
  background: var(--surface-hover) !important;
  color: #a78bfa !important;
}

/* دکمه‌ها */
[data-theme="dark"] .btn-primary {
  background: #a78bfa !important;
  color: #ffffff !important;
  border: none !important;
}

[data-theme="dark"] .btn-primary:hover {
  background: #8b5cf6 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-secondary {
  background: var(--surface-elevated) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--surface-hover) !important;
  color: #a78bfa !important;
}

[data-theme="dark"] .btn-outline-primary {
  background: transparent !important;
  color: #a78bfa !important;
  border-color: #a78bfa !important;
}

[data-theme="dark"] .btn-outline-primary:hover {
  background: #a78bfa !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-outline-secondary {
  background: transparent !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
  background: var(--surface-hover) !important;
  color: #a78bfa !important;
}

/* کارت‌ها */
[data-theme="dark"] .card {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
  background: inherit !important;
  color: #ffffff !important;
}

[data-theme="dark"] .card-title {
  color: #ffffff !important;
}

[data-theme="dark"] .card-text {
  color: #d1d5db !important;
}

/* فرم‌ها */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: #a78bfa !important;
  box-shadow: 0 0 0 0.2rem rgba(167, 139, 250, 0.25) !important;
}

[data-theme="dark"] .form-label {
  color: #ffffff !important;
}

/* جداول */
[data-theme="dark"] .table {
  background: var(--surface-color) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .table th {
  background: var(--surface-elevated) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .table td {
  color: #d1d5db !important;
  border-color: var(--surface-border) !important;
}

/* سایر عناصر */
[data-theme="dark"] .bg-light {
  background: var(--surface-elevated) !important;
}

[data-theme="dark"] .bg-white {
  background: var(--surface-color) !important;
}

[data-theme="dark"] .border {
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] hr {
  border-color: var(--surface-border) !important;
  opacity: 0.3;
}

[data-theme="dark"] .list-group-item {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

[data-theme="dark"] .modal-content {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

/* Pagination */
[data-theme="dark"] .pagination .page-link {
  background: var(--surface-color) !important;
  border-color: var(--surface-border) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
  background: #a78bfa !important;
  border-color: #a78bfa !important;
  color: #ffffff !important;
}

/* آیکن‌ها */
[data-theme="dark"] i {
  color: inherit !important;
}

/* ========================= */
/* جداول پنل ادمین - دارک مود */
/* ========================= */

/* جداول Bootstrap */
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td,
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > th {
  background-color: rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > td,
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > th {
  background-color: var(--surface-color) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .table-responsive {
  background: var(--surface-color) !important;
  border-radius: 8px;
}

[data-theme="dark"] .table {
  background: var(--surface-color) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
  margin-bottom: 0 !important;
}

[data-theme="dark"] .table thead th {
  background: var(--surface-elevated) !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
  font-weight: 600;
}

[data-theme="dark"] .table tbody td {
  background: inherit !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
  vertical-align: middle;
}

[data-theme="dark"] .table tbody tr {
  background: inherit !important;
}

[data-theme="dark"] .table tbody tr:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* جداول کوچک */
[data-theme="dark"] .table-sm th,
[data-theme="dark"] .table-sm td {
  background: inherit !important;
  color: #ffffff !important;
  border-color: var(--surface-border) !important;
}

/* Badge ها در جداول */
[data-theme="dark"] .badge {
  color: #ffffff !important;
}

[data-theme="dark"] .badge-success {
  background-color: #059669 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge-warning {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge-primary {
  background-color: #8b5cf6 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .badge-secondary {
  background-color: #6b7280 !important;
  color: #ffffff !important;
}

/* دکمه‌های کوچک در جداول */
[data-theme="dark"] .btn-sm {
  color: #ffffff !important;
}

[data-theme="dark"] .btn-outline-primary.btn-sm {
  color: #a78bfa !important;
  border-color: #a78bfa !important;
}

[data-theme="dark"] .btn-outline-primary.btn-sm:hover {
  background: #a78bfa !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-outline-danger.btn-sm {
  color: #f87171 !important;
  border-color: #f87171 !important;
}

[data-theme="dark"] .btn-outline-danger.btn-sm:hover {
  background: #dc2626 !important;
  color: #ffffff !important;
}

/* ========================= */
/* Badge های Bootstrap - هر دو حالت */
/* ========================= */

/* حالت لایت - Bootstrap 5 badges */
.badge {
  font-size: 0.75em;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
}

.bg-success {
  background-color: #198754 !important;
}

.bg-warning {
  background-color: #ffc107 !important;
}

.bg-danger {
  background-color: #dc3545 !important;
}

.bg-primary {
  background-color: #0d6efd !important;
}

.bg-secondary {
  background-color: #6c757d !important;
}

.bg-info {
  background-color: #0dcaf0 !important;
}

.text-white {
  color: #ffffff !important;
}

.text-dark {
  color: #212529 !important;
}

/* دارک مود - Badge ها */
[data-theme="dark"] .badge {
  color: #ffffff !important;
}

[data-theme="dark"] .bg-success {
  background-color: #059669 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .bg-warning {
  background-color: #d97706 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .bg-danger {
  background-color: #dc2626 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .bg-primary {
  background-color: #8b5cf6 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .bg-secondary {
  background-color: #6b7280 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .bg-info {
  background-color: #0891b2 !important;
  color: #ffffff !important;
}

/* اطمینان از خوانایی در لایت مود */
.bg-warning .text-dark,
[data-theme="light"] .bg-warning {
  color: #000000 !important;
}

.bg-warning.text-white {
  color: #000000 !important;
}

/* Badge های قدیمی Bootstrap 4 - برای سازگاری */
.badge-success {
  background-color: #198754 !important;
  color: #ffffff !important;
}

.badge-warning {
  background-color: #ffc107 !important;
  color: #000000 !important;
}

.badge-danger {
  background-color: #dc3545 !important;
  color: #ffffff !important;
}

.badge-primary {
  background-color: #0d6efd !important;
  color: #ffffff !important;
}

.badge-secondary {
  background-color: #6c757d !important;
  color: #ffffff !important;
}

/* ==========================================
   تنظیمات اکوردیون در حالت تاریک
========================================== */

[data-theme="dark"] .accordion {
  background: var(--surface-color) !important;
}

[data-theme="dark"] .accordion-item {
  background: var(--surface-color) !important;
  border: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .accordion-header {
  background: var(--surface-color) !important;
}

[data-theme="dark"] .accordion-button {
  background: #374151 !important;
  color: #f8fafc !important;
  border: none !important;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
  background: #4b5563 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
}

[data-theme="dark"] .accordion-button:focus {
  background: #4b5563 !important;
  color: #f8fafc !important;
  box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
}

[data-theme="dark"] .accordion-button::after {
  filter: brightness(0) invert(1) !important;
}

[data-theme="dark"] .accordion-body {
  background: var(--surface-color) !important;
  color: #d1d5db !important;
  border-top: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .accordion-collapse {
  background: var(--surface-color) !important;
}

/* ==========================================
   استایل‌های منوی کشویی Sidebar
========================================== */

.list-group-item[data-bs-toggle="collapse"] {
  position: relative;
  transition: all 0.3s ease;
}

.list-group-item[data-bs-toggle="collapse"]:hover {
  background: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.list-group-item[data-bs-toggle="collapse"].active {
  background: var(--bs-primary) !important;
  color: white !important;
}

.list-group-item[data-bs-toggle="collapse"].active .fas {
  color: white !important;
}

.list-group-item[data-bs-toggle="collapse"] .fa-chevron-down {
  transition: transform 0.3s ease;
}

.list-group-item[data-bs-toggle="collapse"]:not(.collapsed) .fa-chevron-down {
  transform: rotate(180deg);
}

/* زیرمنو استایل */
.collapse .list-group {
  border: none;
  box-shadow: none;
}

.collapse .list-group-item {
  border-left: none;
  border-right: none;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  background: rgba(var(--bs-primary-rgb), 0.02);
  transition: all 0.3s ease;
}

.collapse .list-group-item:hover {
  background: rgba(var(--bs-primary-rgb), 0.08) !important;
  transform: translateX(-2px);
}

.collapse .list-group-item.active {
  background: rgba(var(--bs-primary-rgb), 0.15) !important;
  border-right: 3px solid var(--bs-primary) !important;
  font-weight: bold;
}

/* Navbar Toggler - اضافی برای اطمینان */
.navbar-toggler {
  position: relative;
  display: inline-block;
}

/* تقویت CSS برای دارک مود */
body[data-theme="dark"] .navbar-toggler-icon,
html[data-theme="dark"] .navbar-toggler-icon,
[data-bs-theme="dark"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
  filter: brightness(0) invert(1);
}

/* برای سیستم‌های با تم تاریک */
@media (prefers-color-scheme: dark) {
  .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-miterlimit='10' stroke-width='3' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    filter: brightness(0) invert(1);
  }
}

/* حالت تاریک برای منوی کشویی */
[data-theme="dark"] .list-group-item[data-bs-toggle="collapse"] {
  background: var(--surface-color) !important;
  color: #f8fafc !important;
  border: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .list-group-item[data-bs-toggle="collapse"]:hover {
  background: rgba(99, 102, 241, 0.2) !important;
}

[data-theme="dark"] .list-group-item[data-bs-toggle="collapse"].active {
  background: rgba(99, 102, 241, 0.3) !important;
}

[data-theme="dark"] .collapse .list-group-item {
  background: rgba(55, 65, 81, 0.5) !important;
  color: #d1d5db !important;
  border-bottom: 1px solid var(--surface-border) !important;
}

[data-theme="dark"] .collapse .list-group-item:hover {
  background: rgba(75, 85, 99, 0.7) !important;
}

[data-theme="dark"] .collapse .list-group-item.active {
  background: rgba(99, 102, 241, 0.25) !important;
  border-right: 3px solid #6366f1 !important;
  color: #f8fafc !important;
}

/* Hero Section Styles */
.hero-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  margin-bottom: 2rem;
}

.hero-image {
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
}