﻿@font-face {
  font-family: "Vazir";
  src: url("../fonts/Vazir-Medium.woff2") format("woff2");
}

:root {
  --bg-color: #ffffff;
  --bg-secondary: #f5f7fb;
  --bg-accent: #f0f4ff;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-gradient-start: #2563eb;
  --color-gradient-end: #1d4ed8;
  --border-color: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.08);
  --shadow-md: 0 15px 35px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 40px 80px -40px rgba(15, 23, 42, 0.35);
  --radius: 18px;
  --transition: all 0.2s ease;
  --font-family: "Vazir", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  background: var(--bg-secondary);
  color: var(--color-text);
  margin: 0;
  line-height: 1.6;
  min-height: 100vh;
}

.dashboard-container {
  max-width: 1200px;
  margin: 2rem auto 3rem;
  padding: 0 1.25rem 3rem;
}

.glass-panel {
  background: var(--bg-color);
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  border-radius: 28px;
}

.dashboard-hero {
  display: flex;
  gap: 2rem;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 246, 255, 0.9));
  isolation: isolate;
}

.dashboard-hero::before,
.dashboard-hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(0);
  z-index: -1;
}

.dashboard-hero::before {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35), transparent 65%);
  left: -60px;
  bottom: -40px;
}

.dashboard-hero::after {
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.25), transparent 70%);
  right: -40px;
  top: -60px;
}

.hero-text {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--color-primary);
  padding: 0.25rem 0.8rem;
  border-radius: 999px;
  font-size: 0.9rem;
  width: max-content;
}

.hero-text h1 {
  margin: 0 0 1rem;
  font-size: 2.6rem;
  color: #111827;
}

.hero-subtitle {
  margin: 0 0 1.5rem;
  color: var(--color-text-light);
  max-width: 520px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

.hero-btn.primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
}

.hero-btn.ghost {
  background: #eef2ff;
  color: var(--color-primary);
}

.hero-btn:hover {
  transform: translateY(-2px);
  background: var(--color-primary-hover);
  color: #fff;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #e0ecff;
  color: var(--color-primary);
  font-size: 0.85rem;
}

.hero-tag.subtle {
  background: #f3f4f6;
  color: var(--color-text-light);
}

.hero-highlights {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-summary-card,
.hero-side-card {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid rgba(15, 23, 42, 0.05);
  padding: 1.5rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.summary-card-header,
.hero-side-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.summary-card-header h4,
.hero-side-header h4 {
  margin: 0;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 1rem;
}

.summary-metric {
  background: #f8fafc;
  border-radius: 16px;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.summary-metric p {
  margin: 0;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.summary-metric span {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.summary-note {
  margin-top: 1.2rem;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.hero-side-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-side-header span {
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.hero-side-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.hero-side-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 500;
}

.hero-mini-btn {
  border: none;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.92rem;
  width: fit-content;
}

.hero-mini-btn:hover {
  background: rgba(37, 99, 235, 0.2);
}

.status-pill {
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(37, 99, 235, 0.12);
  color: var(--color-primary);
}

.status-pill.ready {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.status-pill.medium {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.status-pill.heavy {
  background: rgba(248, 113, 113, 0.18);
  color: #b91c1c;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: stretch;
}

.stats-grid > a {
  display: block;
  height: 100%;
}

.stat-card {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  height: 100%;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}

.stat-info {
  flex-grow: 1;
}

.stat-info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin: 0;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.3rem 0;
  color: var(--color-text);
}

.stat-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.stat-trend {
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  background: rgba(15, 23, 42, 0.04);
  font-weight: 600;
  min-width: 64px;
  justify-content: center;
}

.stat-trend.trend-up {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.12);
}

.stat-trend.trend-neutral {
  color: #f97316;
  background: rgba(249, 115, 22, 0.12);
}

.stat-trend.trend-down {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.12);
}

.soft-red {
  background-color: #eef2ff;
  color: var(--color-primary);
}

.soft-amber {
  background-color: #fff7ed;
  color: #ea580c;
}

.soft-blue {
  background-color: #e0f2fe;
  color: #0284c7;
}

.soft-green {
  background-color: #ecfdf5;
  color: #10b981;
}

.quick-actions {
  margin-bottom: 2.5rem;
  padding: 2rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-header h3,
.section-header h4 {
  margin: 0;
  color: var(--color-text);
}

.section-header p {
  margin: 0.25rem 0 0;
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.link-ghost {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.quick-action-card {
  background: var(--bg-color);
  border-radius: 20px;
  padding: 1rem 1.2rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: var(--transition);
}

.quick-action-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.action-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
}

.action-title {
  margin: 0;
  font-weight: 600;
}

.action-desc {
  margin: 0.2rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.action-caret {
  margin-right: auto;
  color: #94a3b8;
}

/* اسکلت لودينگ براي مقدارها */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-value {
  height: 2rem;
  width: 50%;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.chart-container {
  background-color: var(--bg-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-panel {
  min-height: 360px;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.chart-header h4,
.chart-container h4 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--color-text);
}

.chart-subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.chart-filters {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--color-text-light);
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.chart-container canvas {
  max-height: 250px;
}

.highlight-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.insight-list li {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.insight-list li div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--color-primary), #7c3aed);
}

.progress span.amber {
  background: linear-gradient(135deg, #f59e0b, #f97316);
}

.progress span.green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.highlight-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

.content-card,
.info-card {
  background-color: var(--bg-accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.content-card h3,
.info-card h4 {
  margin: 0;
  font-size: 1.2rem;
  color: var(--color-text);
  border: none;
  padding: 0;
}

.activity-list,
.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}

.activity-list li {
  background-color: rgba(15, 23, 42, 0.04);
  border-right: 3px solid var(--color-primary);
  padding: 1rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  font-size: 0.9rem;
  transition: background-color 0.2s;
}

.activity-list li:hover {
  background-color: rgba(220, 38, 38, 0.08);
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.95rem;
}

.info-list li:last-child {
  border-bottom: none;
}

.sidebar-cards {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.badge {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
}

.badge.soft {
  background: rgba(255, 255, 255, 0.5);
  color: #2563eb;
}

.pill-btn {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: transparent;
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  cursor: pointer;
  color: var(--color-text);
  font-family: inherit;
}

.focus-list {
  list-style: decimal;
  padding-right: 1.25rem;
  margin: 0;
  color: var(--color-text-light);
  line-height: 1.8;
}

.notification-popup {
  position: fixed;
  top: 70px;
  left: 20px;
  width: 300px;
  background: var(--bg-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1000;
  border: 1px solid var(--border-color);
}

.notification-list {
  list-style: none;
  padding: 10px;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

.notification-item {
  padding: 10px 15px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: background-color 0.2s;
}

.notification-item:hover {
  background: var(--bg-secondary);
}

@media (max-width: 968px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-hero {
    flex-direction: column;
    padding: 2rem;
  }
  .hero-highlights {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .dashboard-container {
    margin: 1rem auto;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .hero-meta {
    flex-direction: column;
  }
  .hero-actions {
    flex-direction: column;
  }
}

/* --- پشتيباني از آيکون‌هاي Font Awesome --- */
.stat-icon i,
.btn-icon i {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
}

