/* ============================================================
   DASHBOARD PAGE — dashboard.css
   ============================================================ */

/* Analytics banner container */
.analytics-banner {
  position: relative;
  min-height: 220px;
  background-image: url('Images/analytics_banner_bg.png');
  background-size: cover;
  background-position: center right;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: var(--space-lg) var(--space-2xl);
  transition: all var(--dur-mid) var(--ease);
}

.analytics-banner:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

/* Contrast Overlay */
.analytics-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    rgba(247,248,252,0.97) 0%,
    rgba(247,248,252,0.92) 40%,
    rgba(247,248,252,0.60) 75%,
    rgba(247,248,252,0.18) 100%
  );
  z-index: 1;
}

/* Banner Content */
.analytics-banner-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 12px;
}

/* Badge/Tag */
.analytics-banner-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  background: var(--brand-light);
  border: 1px solid var(--brand-border);
  border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--brand);
}

.pulse-dot {
  width: 6px; height: 6px;
  background-color: var(--brand);
  border-radius: 50%; position: relative;
}
.pulse-dot::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: 50%;
  border: 1px solid var(--brand);
  animation: pulse 1.8s cubic-bezier(0.4,0,0.2,1) infinite;
}

/* Title & Subtitle */
.analytics-banner-title {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800; line-height: 1.15;
  color: var(--text-primary); letter-spacing: -0.02em; margin: 0;
}

.gold-gradient-text {
  color: var(--accent);
}

.analytics-banner-subtitle {
  font-size: 0.95rem; color: var(--text-body);
  max-width: 520px; line-height: 1.65; margin: 0 0 8px 0;
}

/* Stats in Banner */
.analytics-banner-stats {
  display: flex; align-items: center; gap: var(--space-lg);
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  padding: 12px 20px; border-radius: var(--radius-md);
}

.banner-stat { display: flex; flex-direction: column; gap: 2px; }

.banner-stat-value {
  font-size: 1.25rem; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}

.banner-stat-label {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.banner-stat-sep {
  width: 1px; height: 28px;
  background-color: var(--border-subtle);
}

/* Banner Decorative Graphic */
.analytics-banner-graphic {
  position: relative; z-index: 2;
  display: flex; justify-content: flex-end;
  align-items: center; height: 100%;
}

.glass-mini-chart {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px; width: 180px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 12px;
  animation: float 5s ease-in-out infinite;
}

.mini-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.72rem; font-weight: 700; color: var(--text-muted);
}

.chart-percentage { color: var(--success); font-weight: 800; }

.mini-chart-bars {
  display: flex; align-items: flex-end; justify-content: space-between;
  height: 60px; gap: 6px;
}

.mini-bar {
  width: 6px; height: var(--h);
  background: var(--surface-inset);
  border-radius: 3px;
  transition: all var(--dur-mid) var(--ease);
}

.mini-bar.active {
  background: var(--brand);
  box-shadow: 0 2px 6px rgba(37,99,235,0.25);
}

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md); margin-bottom: var(--space-lg);
}

/* Two-col layout */
.dash-cols {
  display: grid; grid-template-columns: 1.8fr 1fr;
  gap: var(--space-xl); align-items: start;
}
.dash-left-col  { display: flex; flex-direction: column; gap: var(--space-xl); }
.dash-right-col { display: flex; flex-direction: column; gap: var(--space-xl); }

/* Dash card */
.dash-card { overflow: hidden; display: flex; flex-direction: column; }
.dash-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap; gap: var(--space-md);
}

/* Table */
.table-wrap { overflow-x: auto; }
.order-id {
  font-family: var(--font-mono); font-size: 0.78rem;
  background: var(--surface-alt); padding: 3px 8px;
  border-radius: 4px; color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

/* Notification badge */
.notif-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px;
  background: var(--error); color: #fff;
  border-radius: 50%; font-size: 0.7rem; font-weight: 700;
  margin-left: 4px;
}

/* Refund Status Preview */
.refund-status-preview { border-radius: var(--radius-md); overflow: hidden; margin-bottom: var(--space-md); max-height: 150px; }
.refund-status-preview img { width: 100%; object-fit: cover; object-position: center; }
.refund-info { display: flex; flex-direction: column; gap: 10px; }
.refund-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
}
.refund-row:last-child { border-bottom: none; }

/* Premium Widget */
.premium-widget {
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
}

/* Notifications */
.notif-list { display: flex; flex-direction: column; gap: 0; }
.notif-item {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread {
  background: var(--brand-light);
  margin: 0 -24px; padding: 12px 24px;
}
.notif-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-content { flex: 1; }

/* Return history image */
.return-history-img { border-radius: var(--radius-md); overflow: hidden; }
.return-history-img img { width: 100%; }

/* Return history placeholder */
.return-history-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-xl);
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  text-align: center;
  border: 1.5px dashed var(--border-strong);
}

/* Sidebar user */
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong, .sidebar-user-info p { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Responsive */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .analytics-banner { padding: var(--space-lg) var(--space-xl); }
}
@media (max-width: 992px) {
  .analytics-banner { grid-template-columns: 1fr; padding: var(--space-lg) var(--space-xl); }
  .analytics-banner-graphic { display: none; }
  .analytics-banner-overlay {
    background: linear-gradient(135deg,
      rgba(247,248,252,0.98) 0%,
      rgba(247,248,252,0.95) 50%,
      rgba(247,248,252,0.88) 100%
    );
  }
}
@media (max-width: 768px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  #sidebar-toggle { display: flex !important; }
  .analytics-banner { min-height: auto; padding: var(--space-md) var(--space-lg); }
  .analytics-banner-stats { flex-wrap: wrap; gap: var(--space-sm); background: var(--surface); width: 100%; }
  .banner-stat-sep { display: none; }
  .banner-stat { flex: 1; min-width: 100px; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .topbar-right .btn-outline { display: none; }
  .analytics-banner-stats { padding: 8px 12px; }
  .banner-stat-value { font-size: 1.1rem; }
}
