.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem 2.25rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  border-radius: var(--radius-xl);
  color: white;
  position: relative;
  overflow: hidden;
}

.dashboard-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.hero-desc {
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.65);
  max-width: 420px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  position: relative;
  z-index: 1;
}

.quick-action-btn {
  padding: 0.6rem 1.125rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.quick-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.quick-action-btn.primary {
  background: white;
  color: #312e81;
  border-color: white;
}

.quick-action-btn.primary:hover {
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.375rem;
  border: 1px solid var(--border);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

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

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.stat-card-top {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.stat-trend {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--success);
  background: var(--success-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.stat-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.5rem;
}

.panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.panel-header h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text);
}

.panel-header p {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.panel-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  transition: color 0.2s;
}

.panel-link:hover {
  color: var(--primary-dark);
}

.panel-empty {
  text-align: center;
  padding: 2.5rem 1rem;
}

.panel-empty p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sales-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sale-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.125rem;
  background: var(--bg-subtle);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}

.sale-row:hover {
  background: #eef2ff;
}

.sale-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.sale-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sale-customer {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
}

.sale-product {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.sale-meta {
  text-align: right;
}

.sale-amount {
  display: block;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--success);
}

.sale-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.sale-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8b5cf6);
  border-radius: 0 3px 0 0;
  opacity: 0.6;
  transition: width 0.5s ease;
}

.dashboard-side {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.revenue-display {
  text-align: center;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.25rem;
}

.revenue-amount {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.revenue-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.revenue-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.breakdown-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-subtle);
  border-radius: 10px;
}

.breakdown-item span {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.breakdown-item strong {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.stock-ok {
  text-align: center;
  padding: 2rem 1rem;
}

.stock-ok p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.stock-alert-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stock-alert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.stock-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.stock-qty {
  font-size: 0.75rem;
  font-weight: 700;
}

.stock-qty.low { color: var(--warning); }
.stock-qty.critical { color: var(--danger); }

.stock-bar-track {
  height: 6px;
  background: var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

.stock-bar-fill.low {
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.stock-bar-fill.critical {
  background: linear-gradient(90deg, #ef4444, #f87171);
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard-hero {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
