/* =========================================
   Dashboard – VisionAI
   Extends the global white/rainbow theme
   Author: Zabiullah
========================================= */

/* ===== NAVBAR (matches main site) ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light, #f1f5f9);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo .highlight {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: rainbowShift 6s linear infinite;
}

.logo small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 4px;
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rainbow);
  transition: width 0.3s ease;
  border-radius: 999px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text, #0f172a);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.btn-logout {
  background: transparent;
  border: 1px solid #ef4444;
  color: #ef4444;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-logout:hover {
  background: #ef4444;
  color: #fff;
}

/* ===== DASHBOARD SECTION ===== */
.dashboard-section {
  padding: 2.5rem 0;
  flex: 1;
}

.welcome-header {
  margin-bottom: 2rem;
}

.welcome-header h1 {
  font-size: 2rem;
  font-weight: 700;
}

.welcome-header h1 span {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  animation: rainbowShift 6s linear infinite;
}

.welcome-header p {
  color: var(--text-muted, #64748b);
  margin-top: 0.25rem;
}

/* ===== STATS CARDS ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 16px);
  padding: 1.5rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rainbow);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md, 0 8px 30px rgba(0, 0, 0, 0.08));
  border-color: transparent;
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.card-header i {
  font-size: 1.5rem;
  color: #7c4dff;
  width: 2rem;
  flex-shrink: 0;
}

.card-header h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text, #0f172a);
  line-height: 1.2;
}

.card-sub {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.25rem;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted, #64748b);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 16px);
  padding: 1rem 1.5rem;
  color: var(--text, #0f172a);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.action-btn i {
  font-size: 1.2rem;
  color: #7c4dff;
  transition: color 0.3s ease;
}

.action-btn:hover {
  background: var(--rainbow);
  background-size: 200% auto;
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(124, 77, 255, 0.25);
  color: #fff;
}

.action-btn:hover i {
  color: #fff;
}

/* ===== FOOTER ===== */
footer {
  background: #fff;
  border-top: 1px solid var(--border, #e2e8f0);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  margin-top: 2rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .navbar .container {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }

  .welcome-header h1 {
    font-size: 1.5rem;
  }

  .card-value {
    font-size: 1.8rem;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 20px;
  }

  .logo small {
    font-size: 8px;
    letter-spacing: 2px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .btn-logout {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }
}