/* Grid Container */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

/* Base Card Style */
.overview-card {
  padding: 20px;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.overview-card:hover {
  transform: translateY(-3px);
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.card-value {
  font-size: 22px;
  font-weight: bold;
}

.card-meta {
  font-size: 13px;
  line-height: 1.4;
  margin-top: 6px;
}

/* Card Color Themes */
.bg-green {
  background-color: #059669;
}

.bg-orange {
  background-color: #f97316;
}

.bg-blue {
  background-color: #3b82f6;
}

.bg-teal {
  background-color: #0891b2;
}

.bg-dark-green {
  background-color: #047857;
}


/* Mini Card Grid */
.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Mini Card Base */
.mini-card {
  background-color: #fff;
  border-radius: 10px;
  padding: 15px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: all 0.2s ease-in-out;
}

.mini-card:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.mini-card .icon i {
  background-color: #f3f4f6;
  color: #111827;
  padding: 10px;
  border-radius: 8px;
  font-size: 18px;
}

.mini-card .text {
  flex: 1;
}

.mini-card .label {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.mini-card .value {
  font-size: 18px;
  font-weight: 600;
}

.danger {
  color: #dc2626;
}


.dashboard-overview,
.dashboard-summary {
  margin-bottom: 30px;
}





/* chart cards */


.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.chart-box {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 0 1px #e5e7eb;
}

.chart-box h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.chart-container {
  height: 300px;
  width: 100%;
}

/* Optional tab styling */
.chart-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 10px;
}

.chart-tabs .tab {
  cursor: pointer;
  padding: 6px 10px;
  font-size: 14px;
  color: #4b5563;
  border-bottom: 2px solid transparent;
}

.chart-tabs .tab.active {
  border-color: #10b981;
  color: #111827;
}




/* ========== Shared grid for both rows ========== */
.card-grid,
.mini-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)); /* same columns on both rows */
  gap: 20px;
  margin: 20px 0;
}

/* Responsive breakpoints (same for both rows) */
@media (max-width: 1280px) {
  .card-grid,
  .mini-card-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (max-width: 920px) {
  .card-grid,
  .mini-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .card-grid,
  .mini-card-grid { grid-template-columns: repeat(2 1fr); }
}

/* ========== Equal heights + tidy vertical rhythm ========== */
.overview-card,
.mini-card {
  min-height: 110px;                  /* same visual height */
  display: flex;
  flex-direction: column;
  justify-content: center;            /* center content vertically */
}

/* Keep existing looks (you can keep your originals) */
.overview-card {
  padding: 20px;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}
.overview-card:hover { transform: translateY(-3px); }

.card-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.card-value { font-size: 22px; font-weight: 500; }
.card-meta  { font-size: 13px; line-height: 1.4; margin-top: 6px; }

/* Mini cards keep icon + text row layout but stay same height as overview */
.mini-card {
  background: #fff;
  border-radius: 10px;
  padding: 15px 18px;
  flex-direction: row;                /* icon left, text right */
  align-items: center;
  gap: 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: box-shadow .2s ease-in-out;
}
.mini-card:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

.mini-card .icon i {
  background: #f3f4f6;
  color: #111827;
  padding: 10px;
  border-radius: 8px;
  font-size: 18px;
}

.mini-card .text { flex: 1; }
.mini-card .label { font-size: 13px; color: #4b5563; margin-bottom: 4px; }
.mini-card .value { font-size: 18px; font-weight: 700; }

/* Colors for overview cards */
.bg-green      { background-color: #059669; }
.bg-orange     { background-color: #f97316; }
.bg-blue       { background-color: #3b82f6; }
.bg-teal       { background-color: #0891b2; }
.bg-dark-green { background-color: #047857; }

/* Section spacing */
.dashboard-overview,
.dashboard-summary { margin-bottom: 30px; }

/* Charts unchanged; included for completeness */
.dashboard-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}
@media (max-width: 920px) {
  .dashboard-charts { grid-template-columns: 1fr; }
}
.chart-box {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 0 1px #e5e7eb;
}
.chart-box h3 { font-size: 16px; margin-bottom: 10px; }
.chart-container { height: 300px; width: 100%; }
.chart-tabs { display: flex; gap: 15px; margin-bottom: 10px; }
.chart-tabs .tab { cursor: pointer; padding: 6px 10px; font-size: 14px; color: #4b5563; border-bottom: 2px solid transparent; }
.chart-tabs .tab.active { border-color: #10b981; color: #111827; }











/* Base pill */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  border: 1px solid transparent;
  line-height: 1;
  white-space: nowrap;
}

/* Pending (amber) */
.status.pending {
  background: #fff7ed;   /* amber-50 */
  border-color: #fde68a; /* amber-200 */
  color: #92400e;        /* amber-800 */
}

/* Processing (blue) */
.status.processing {
  background: #eff6ff;   /* blue-50 */
  border-color: #93c5fd; /* blue-300 */
  color: #1e40af;        /* blue-800 */
}

/* Shipped (sky) */
.status.shipped {
  background: #f0f9ff;   /* sky-50 */
  border-color: #01c95e; /* sky-300 */
  color: #0c4a6e;        /* sky-900 */
}

/* Delivered (emerald/green) — if you use it elsewhere */
.status.delivered {
  background: #ecfdf5;   /* emerald-50 */
  border-color: #a7f3d0; /* emerald-300 */
  color: #065f46;        /* emerald-900 */
}

/* Canceled (red) — supports canceled, cancelled, and 'cancled' */
.status.canceled,
.status.cancelled,
.status.cancled {
  background: #fef2f2;   /* red-50 */
  border-color: #fecaca; /* red-200 */
  color: #991b1b;        /* red-800 */
}

/* Optional: subtle hover emphasis */
.status:hover {
  filter: brightness(0.98);
}








/* ========== Chart cards (mobile-first) ========== */

.dashboard-charts{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(12px, 2.5vw, 20px);
  margin-top: clamp(16px, 3vw, 30px);
}

.chart-box{
  background:#fff;
  border-radius:12px;
  padding: clamp(12px, 3vw, 20px);
  box-shadow: 0 0 0 1px #e5e7eb;
}

.chart-box h3{
  font-size: clamp(14px, 2.5vw, 16px);
  margin-bottom: 8px;
}

/* Keep charts responsive without hard fixed height */
.chart-container{
  width:100%;
  aspect-ratio: 16 / 9;          /* responsive height */
  min-height: 220px;              /* guard for very small phones */
  max-height: 360px;              /* avoid absurdly tall charts */
}

/* Tabs: mobile-friendly, scrollable row with snap */
.chart-tabs{
  display:flex;
  gap: 10px;
  margin-bottom: 8px;
  overflow-x:auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;            /* easier thumb scroll */
}

.chart-tabs .tab{
  flex: 0 0 auto;
  scroll-snap-align: start;
  cursor:pointer;
  padding: 8px 12px;              /* larger hit area */
  font-size: 14px;
  color:#4b5563;
  border-bottom:2px solid transparent;
  border-radius: 8px;             /* nicer touch feel */
  white-space: nowrap;            /* avoid wrapping in narrow view */
}

.chart-tabs .tab.active{
  border-color:#10b981;
  color:#111827;
}

/* ---------- Narrow screens ---------- */
@media (max-width: 768px){
  .dashboard-charts{
    grid-template-columns: 1fr;   /* single column */
  }
  .chart-container{
    aspect-ratio: 4 / 3;          /* a bit taller for readability */
    max-height: 320px;
  }
}

/* Optional: reduce motion */
@media (prefers-reduced-motion: reduce){
  .chart-tabs{ scroll-behavior: auto; }
}


