/* =============================================
   Admin Dashboard — Dark Luxury Theme
   ============================================= */

/* ===== Dashboard Container Override ===== */
#page-dashboard {
  background: linear-gradient(180deg, #0a0e17 0%, #0f1629 100%);
  min-height: calc(100vh - 60px);
}

/* ===== Stats Grid ===== */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

.dash-stat-card {
  position: relative;
  background: linear-gradient(135deg, rgba(16,24,48,0.95) 0%, rgba(12,18,40,0.9) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 24px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: default;
}

.dash-stat-card:hover {
  border-color: rgba(26,86,219,0.4);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 60px rgba(26,86,219,0.08);
}

/* Card accent stripe */
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
}

.dash-stat-card.card-blue::before { background: linear-gradient(90deg, #1a56db, #3b82f6); }
.dash-stat-card.card-gold::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dash-stat-card.card-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.dash-stat-card.card-purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

/* Card shine effect */
.dash-stat-card::after {
  content: '';
  position: absolute;
  top: -50%; right: -50%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  pointer-events: none;
}

.dash-stat-label {
  font-size: 0.78rem;
  color: #8896b0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
  font-weight: 500;
}

.dash-stat-value {
  font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
  font-size: 2.4rem;
  font-weight: 700;
  color: #f0f4ff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.dash-stat-sub {
  font-size: 0.82rem;
  color: #8896b0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-stat-sub .up { color: #10b981; }
.dash-stat-sub .down { color: #ef4444; }
.dash-stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.dash-stat-badge.up {
  background: rgba(16,185,129,0.12);
  color: #10b981;
}
.dash-stat-badge.warn {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
}

/* ===== Charts Row ===== */
.dash-charts {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dash-chart-card {
  background: linear-gradient(135deg, rgba(16,24,48,0.95) 0%, rgba(12,18,40,0.85) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  position: relative;
}

.dash-chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0f4ff;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-chart-title .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dash-chart-title .dot.blue { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.5); }
.dash-chart-title .dot.gold { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }

.dash-chart-wrap {
  position: relative;
  width: 100%;
  height: 280px;
}

.dash-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== Bottom Row ===== */
.dash-bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 20px;
  margin-bottom: 24px;
}

.dash-table-card {
  background: linear-gradient(135deg, rgba(16,24,48,0.95) 0%, rgba(12,18,40,0.85) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
}

.dash-table-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f0f4ff;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

/* Activity table */
.dash-activity-table {
  width: 100%;
  border-collapse: collapse;
}
.dash-activity-table th {
  text-align: left;
  font-size: 0.72rem;
  color: #5a6a88;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 12px;
  font-weight: 500;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dash-activity-table td {
  font-size: 0.82rem;
  padding: 10px 12px;
  color: #b0bdd0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  white-space: nowrap;
}
.dash-activity-table tr:hover td {
  background: rgba(26,86,219,0.06);
}
.dash-rate-good { color: #10b981; font-weight: 600; }
.dash-rate-warn { color: #f59e0b; font-weight: 600; }
.dash-rate-bad { color: #ef4444; font-weight: 600; }

/* Grade distribution bars */
.dash-grade-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.dash-grade-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-grade-label {
  width: 56px;
  font-size: 0.78rem;
  color: #8896b0;
  text-align: right;
  flex-shrink: 0;
}
.dash-grade-bar-wrap {
  flex: 1;
  height: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 4px;
  overflow: hidden;
}
.dash-grade-bar {
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s ease;
}
.dash-grade-bar.g1 { background: linear-gradient(90deg, #1a56db, #3b82f6); }
.dash-grade-bar.g2 { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.dash-grade-bar.g3 { background: linear-gradient(90deg, #10b981, #34d399); }
.dash-grade-bar.g4 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dash-grade-count {
  width: 32px;
  font-size: 0.78rem;
  color: #b0bdd0;
  font-weight: 600;
  flex-shrink: 0;
}

/* Todo sidebar */
.dash-todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dash-todo-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s;
}
.dash-todo-item:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.dash-todo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-todo-dot.warning { background: #f59e0b; box-shadow: 0 0 8px rgba(245,158,11,0.5); }
.dash-todo-dot.info { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.5); }
.dash-todo-dot.success { background: #10b981; box-shadow: 0 0 8px rgba(16,185,129,0.5); }
.dash-todo-text {
  flex: 1;
  font-size: 0.82rem;
  color: #b0bdd0;
}
.dash-todo-count {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f0f4ff;
  font-family: 'SF Mono', 'JetBrains Mono', 'Consolas', monospace;
}

/* ===== Entrance Animation ===== */
@keyframes dashFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-animate {
  animation: dashFadeUp 0.5s ease forwards;
  opacity: 0;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-charts { grid-template-columns: 1fr; }
  .dash-bottom { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .dash-stats { grid-template-columns: 1fr; gap: 12px; }
  .dash-stat-card { padding: 20px 18px; }
  .dash-stat-value { font-size: 1.8rem; }
  .dash-charts { grid-template-columns: 1fr; }
  .dash-chart-wrap { height: 220px; }
  .dash-bottom { grid-template-columns: 1fr; }
  .dash-activity-table td, .dash-activity-table th { font-size: 0.7rem; padding: 6px 8px; }
}
