/* Dashboard — Enhanced Modern UI Design */
.dash-wrap { --dash-radius: 16px; --dash-shadow: 0 2px 10px rgba(15, 23, 42, 0.04); }

.dash-hero {
  background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 55%, #3b82f6 100%) !important;
  border-radius: var(--dash-radius);
  padding: 1.4rem 1.8rem;
  color: #fff;
  margin-bottom: 1.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.16);
}

.dash-hero::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -5%;
  width: 280px;
  height: 280px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.dash-hero-logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.dash-hero-title {
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.dash-nav-btn {
  font-size: 0.82rem;
  padding: 0.45rem 1.05rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  text-decoration: none;
  font-weight: 500;
  backdrop-filter: blur(8px);
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
}

.dash-nav-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  transform: translateY(-1px);
}

.dash-filter-bar {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
}

.filter-header-title {
  font-size: 13px;
  color: #475569;
}

.dash-filter-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 10px;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  height: 36px;
  position: relative;
}

.dash-filter-location {
  min-width: 170px;
}

.dash-filter-date {
  min-width: 155px;
}

.pill-icon {
  font-size: 13px;
  flex-shrink: 0;
}

.pill-icon-right {
  font-size: 12px;
  flex-shrink: 0;
}

.pill-select {
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-weight: 500;
  color: #1e293b;
  outline: none;
  cursor: pointer;
  padding-right: 18px;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
}

.pill-chevron {
  position: absolute;
  right: 10px;
  font-size: 10px;
  pointer-events: none;
}

.pill-input {
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  outline: none;
  width: 100%;
}

.dash-refresh-pill-btn {
  background: #2563eb !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 0 20px !important;
  height: 36px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25) !important;
  transition: all 0.18s ease !important;
}

.dash-refresh-pill-btn:hover {
  background: #1d4ed8 !important;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35) !important;
  transform: translateY(-1px);
}

.dash-stat-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  text-decoration: none;
  color: inherit;
  background: #ffffff;
  border-radius: var(--dash-radius) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
  border: 1px solid #e2e8f0 !important;
  padding: 1.15rem 1.25rem 0.95rem !important;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
  color: inherit;
}

.dash-stat-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3.5px;
  border-radius: var(--dash-radius) var(--dash-radius) 0 0;
}

.dash-stat-card.accent-blue::after { background: #2563eb; }
.dash-stat-card.accent-rose::after { background: #f43f5e; }
.dash-stat-card.accent-emerald::after { background: #10b981; }
.dash-stat-card.accent-sky::after { background: #0284c7; }
.dash-stat-card.accent-cyan::after { background: #06b6d4; }
.dash-stat-card.accent-violet::after { background: #8b5cf6; }
.dash-stat-card.accent-amber::after { background: #f59e0b; }
.dash-stat-card.accent-red::after { background: #ef4444; }
.dash-stat-card.accent-teal::after { background: #0d9488; }
.dash-stat-card.accent-orange::after { background: #ea580c; }

.dash-stat-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dash-stat-content {
  flex: 1;
  min-width: 0;
}

.dash-stat-label {
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  font-weight: 700 !important;
  color: #64748b !important;
  margin-bottom: 2px !important;
}

.dash-stat-value {
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  margin: 0.25rem 0 0.25rem !important;
  line-height: 1.2 !important;
  color: #1e293b !important;
}

.dash-stat-value.text-emerald { color: #059669 !important; }
.dash-stat-value.text-blue { color: #2563eb !important; }
.dash-stat-value.text-cyan { color: #0891b2 !important; }
.dash-stat-value.text-red { color: #dc2626 !important; }
.dash-stat-value.text-amber { color: #d97706 !important; }

.dash-stat-meta {
  font-size: 0.75rem !important;
  color: #94a3b8 !important;
  line-height: 1.35 !important;
}

.dash-stat-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.2rem !important;
  flex-shrink: 0 !important;
}

.dash-stat-icon.icon-blue { background: #eff6ff !important; color: #2563eb !important; }
.dash-stat-icon.icon-rose { background: #fff1f2 !important; color: #f43f5e !important; }
.dash-stat-icon.icon-emerald { background: #ecfdf5 !important; color: #10b981 !important; }
.dash-stat-icon.icon-sky { background: #f0f9ff !important; color: #0284c7 !important; }
.dash-stat-icon.icon-cyan { background: #ecfeff !important; color: #06b6d4 !important; }
.dash-stat-icon.icon-red { background: #fef2f2 !important; color: #ef4444 !important; }
.dash-stat-icon.icon-amber { background: #fffbeb !important; color: #d97706 !important; }
.dash-stat-icon.icon-violet { background: #f5f3ff !important; color: #8b5cf6 !important; }

.dash-stat-footer {
  margin-top: 0.9rem !important;
  padding-top: 0.65rem !important;
  border-top: 1px solid #f1f5f9 !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  color: #2563eb !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.dash-stat-card:hover .dash-stat-footer { color: #1d4ed8 !important; }
.dash-stat-footer i { font-size: 11px; transition: transform 0.18s ease; }
.dash-stat-card:hover .dash-stat-footer i { transform: translateX(3px); }

.dash-panel {
  background: #fff;
  border-radius: var(--dash-radius);
  box-shadow: var(--dash-shadow);
  border: 1px solid rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.dash-panel-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: linear-gradient(to bottom, #fafbfc, #fff);
}

.dash-panel-title { font-size: 1rem; font-weight: 600; margin: 0; color: #1e293b; }

.dash-report-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-decoration: none;
  color: #334155;
  border: 1px solid #f1f5f9;
  background: #fafbfc;
  transition: all 0.18s ease;
  height: 100%;
}

.dash-report-link:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  transform: translateX(2px);
}

.dash-report-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.95rem;
}

.dash-report-link span { font-size: 0.85rem; font-weight: 500; line-height: 1.3; }

.dash-quick-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.dash-hero .dash-quick-nav a {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(6px);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}

.dash-hero .dash-quick-nav a:hover {
  background: rgba(255,255,255,0.25);
  color: #fff;
}

.dash-quick-nav-dark a {
  font-size: 0.78rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s;
}

.dash-quick-nav-dark a:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.transaction-tab .nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: #64748b;
  border: none !important;
  background: transparent;
  width: 100%;
}

.transaction-tab .nav-link.active {
  color: #2563eb !important;
  border-bottom: 2px solid #2563eb !important;
  background: transparent !important;
}

#salesPurchaseChart { width: 100% !important; height: 320px !important; }

.sales-legend, .purchase-legend {
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 6px;
  border-radius: 4px;
  vertical-align: middle;
}

.sales-legend { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.purchase-legend { background: linear-gradient(135deg, #e11d48, #fb7185); }

.graph-sets ul { display: flex; list-style: none; padding: 0; margin: 0; gap: 1rem; }
.graph-sets ul li { display: flex; align-items: center; font-size: 0.82rem; color: #64748b; }

.dash-view-all {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.dash-view-all:hover { color: #1d4ed8; text-decoration: underline; }

.dash-filter-control {
  width: 160px;
  max-width: 100%;
}

.dash-filter-location {
  width: 200px;
}

@media (max-width: 767.98px) {
  .dash-filter-bar .d-flex.flex-wrap {
    width: 100%;
  }

  .dash-filter-control,
  .dash-filter-location {
    width: 100%;
    flex: 1 1 100%;
  }

  #salesPurchaseChart {
    height: 240px !important;
  }
}
