/* ============================================================
   dashboard-modules.css
   E-Commerce + Enhanced Project Management Modules
   Mike Sport Dashboard — Extends existing dashboard variables
   Design: Ultra-modern premium SaaS · Accent #F1582B
   ============================================================ */

/* ============================================================
   1. MODULE NAVIGATION BAR
   ============================================================ */

.module-nav {
  display: flex;
  align-items: center;
  gap: 0;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  padding: 0 28px;
  overflow-x: auto;
  scrollbar-width: none;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.module-nav::-webkit-scrollbar {
  display: none;
}

.module-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 15px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #6b7280;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 180ms ease-out, background 180ms ease-out;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 0;
  letter-spacing: 0.01em;
}

.module-tab:hover {
  color: #111827;
  background: rgba(0, 0, 0, .025);
}

.module-tab.active {
  color: #F1582B;
  border-bottom-color: #F1582B;
  font-weight: 600;
}

.module-tab svg,
.module-tab .nav-icon {
  width: 15px;
  height: 15px;
  opacity: 0.65;
  flex-shrink: 0;
  transition: opacity 180ms ease-out;
}

.module-tab:hover svg,
.module-tab:hover .nav-icon {
  opacity: 0.85;
}

.module-tab.active svg,
.module-tab.active .nav-icon {
  opacity: 1;
  color: #F1582B;
}

.module-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: #F1582B;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

/* Mobile dropdown fallback */
.module-dropdown {
  display: none;
  width: 100%;
  padding: 9px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #111827;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.module-dropdown:focus {
  outline: none;
  border-color: #F1582B;
  box-shadow: 0 0 0 3px rgba(241, 88, 43, .1);
}

/* ============================================================
   2. KPI / OVERVIEW DASHBOARD
   ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
  animation: fadeSlideUp 0.38s ease both;
}

.kpi-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 1px 4px rgba(0, 0, 0, .04);
  transform: translateY(-2px);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #F1582B, #ff7a55);
  opacity: 0;
  transition: opacity 180ms ease-out;
  border-radius: 12px 12px 0 0;
}

.kpi-card:hover::before {
  opacity: 1;
}

.kpi-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(241, 88, 43, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 19px;
  color: #F1582B;
  transition: background 180ms ease-out;
}

.kpi-card:hover .kpi-icon {
  background: rgba(241, 88, 43, .13);
}

.kpi-icon svg {
  width: 20px;
  height: 20px;
}

.kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}

.kpi-trend.up {
  background: rgba(16, 185, 129, .09);
  color: #059669;
}

.kpi-trend.down {
  background: rgba(239, 68, 68, .09);
  color: #dc2626;
}

.kpi-trend::before {
  font-size: 9px;
}

.kpi-trend.up::before {
  content: "▲";
}

.kpi-trend.down::before {
  content: "▼";
}

.kpi-value {
  font-size: 30px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.8px;
  line-height: 1;
}

.kpi-label {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 500;
  letter-spacing: 0.15px;
}

.kpi-sublabel {
  font-size: 11px;
  color: #9ca3af;
  margin-top: -10px;
}

/* Chart Container */
.chart-container {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 24px;
  transition: box-shadow 180ms ease-out;
  animation: fadeSlideUp 0.38s ease 0.08s both;
}

.chart-container:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .07), 0 1px 4px rgba(0, 0, 0, .03);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 12px;
  flex-wrap: wrap;
}

.chart-title {
  font-size: 14.5px;
  font-weight: 650;
  color: #111827;
  letter-spacing: -0.1px;
}

.chart-subtitle {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
  font-weight: 400;
}

.chart-period-selector {
  display: flex;
  gap: 2px;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 3px;
}

.chart-period-btn {
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 500;
  color: #6b7280;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 180ms ease-out;
  letter-spacing: 0.01em;
}

.chart-period-btn.active,
.chart-period-btn:hover {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.chart-period-btn.active {
  color: #F1582B;
  font-weight: 600;
}

.chart-area {
  position: relative;
  width: 100%;
  min-height: 200px;
}

.overview-row {
  display: flex;
  gap: 18px;
  margin-bottom: 28px;
}

.overview-row .chart-container {
  flex: 1;
  min-width: 0;
}

.overview-row .chart-container.wide {
  flex: 2;
}

/* ============================================================
   3. E-COMMERCE MODULE
   ============================================================ */

/* --- Revenue Stats Bar --- */
.ecom-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(0, 0, 0, .06);
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
}

.ecom-stat-card {
  background: #ffffff;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  transition: background 180ms ease-out;
}

.ecom-stat-card:hover {
  background: #fafafa;
}

.ecom-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: #9ca3af;
}

.ecom-stat-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.6px;
  line-height: 1;
}

.ecom-stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 500;
}

.ecom-stat-change.positive { color: #059669; }
.ecom-stat-change.negative { color: #dc2626; }

.sparkline {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 40px;
  opacity: 0.25;
  pointer-events: none;
}

/* --- Orders Table --- */
.orders-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 0 14px;
  flex-wrap: wrap;
}

.orders-search {
  flex: 1;
  min-width: 200px;
  max-width: 300px;
  position: relative;
}

.orders-search input {
  width: 100%;
  padding: 8px 12px 8px 34px;
  font-size: 13px;
  color: #111827;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  outline: none;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.orders-search input::placeholder {
  color: #9ca3af;
}

.orders-search input:focus {
  border-color: #F1582B;
  box-shadow: 0 0 0 3px rgba(241, 88, 43, .1);
}

.orders-search .search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.orders-filter-select {
  padding: 8px 30px 8px 11px;
  font-size: 13px;
  color: #374151;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  transition: border-color 180ms ease-out, box-shadow 180ms ease-out;
}

.orders-filter-select:focus {
  border-color: #F1582B;
  box-shadow: 0 0 0 3px rgba(241, 88, 43, .1);
}

.date-range-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .1);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 180ms ease-out, color 180ms ease-out;
  white-space: nowrap;
}

.date-range-picker:hover {
  border-color: #F1582B;
  color: #F1582B;
}

.toolbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.orders-table-wrapper {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.orders-table thead {
  background: #f8f9fb;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.orders-table th {
  position: sticky;
  top: 0;
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: #9ca3af;
  background: #f8f9fb;
  white-space: nowrap;
  user-select: none;
  cursor: pointer;
  transition: color 180ms ease-out;
}

.orders-table th:hover {
  color: #374151;
}

.orders-table th.sorted {
  color: #F1582B;
}

.orders-table td {
  padding: 13px 16px;
  color: #374151;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  white-space: nowrap;
}

.orders-table tbody tr:last-child td {
  border-bottom: none;
}

.orders-table tbody tr {
  transition: background 180ms ease-out;
}

.orders-table tbody tr:nth-child(even) {
  background: rgba(248, 249, 251, .6);
}

.orders-table tbody tr:hover {
  background: rgba(241, 88, 43, .03);
}

.order-id {
  font-weight: 600;
  color: #F1582B;
  cursor: pointer;
  transition: opacity 180ms ease-out;
}

.order-id:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.order-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.order-status::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.order-status.pending {
  background: rgba(245, 158, 11, .09);
  color: #d97706;
}
.order-status.pending::before { background: #d97706; }

.order-status.processing {
  background: rgba(59, 130, 246, .09);
  color: #2563eb;
}
.order-status.processing::before { background: #2563eb; }

.order-status.shipped {
  background: rgba(139, 92, 246, .09);
  color: #7c3aed;
}
.order-status.shipped::before { background: #7c3aed; }

.order-status.delivered {
  background: rgba(16, 185, 129, .09);
  color: #059669;
}
.order-status.delivered::before { background: #059669; }

.order-status.cancelled {
  background: rgba(239, 68, 68, .09);
  color: #dc2626;
}
.order-status.cancelled::before { background: #dc2626; }

/* Pagination */
.orders-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-top: 1px solid rgba(0, 0, 0, .06);
  background: #f8f9fb;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 12px;
  color: #9ca3af;
  font-weight: 400;
}

.pagination-controls {
  display: flex;
  gap: 4px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #ffffff;
  color: #6b7280;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 180ms ease-out;
  text-decoration: none;
}

.pagination-btn:hover {
  border-color: #F1582B;
  color: #F1582B;
  background: rgba(241, 88, 43, .04);
}

.pagination-btn.active {
  background: #F1582B;
  border-color: #F1582B;
  color: #fff;
  box-shadow: 0 2px 6px rgba(241, 88, 43, .3);
}

.pagination-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

/* --- Inventory Grid --- */
.inventory-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, .06);
  border: 1px solid rgba(239, 68, 68, .18);
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #b91c1c;
  font-weight: 500;
}

.inventory-alert-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  color: #dc2626;
}

.inventory-alert-count {
  font-weight: 700;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.inventory-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
  animation: fadeSlideUp 0.35s ease both;
}

.inventory-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .09), 0 1px 4px rgba(0, 0, 0, .04);
  transform: translateY(-2px);
}

.inventory-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #f3f4f6 0%, #e9eaec 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d1d5db;
  font-size: 30px;
  position: relative;
  overflow: hidden;
}

.inventory-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.inventory-card-body {
  padding: 15px 16px;
}

.inventory-card-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-card-sku {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 12px;
}

.inventory-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.inventory-stock-label {
  font-size: 11.5px;
  color: #6b7280;
}

.inventory-stock-count {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.stock-bar {
  width: 100%;
  height: 4px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}

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

.stock-bar-fill.high   { background: #10b981; }
.stock-bar-fill.medium { background: #f59e0b; }
.stock-bar-fill.low    { background: #ef4444; }

.inventory-price {
  font-size: 14px;
  font-weight: 700;
  color: #F1582B;
  margin-top: 10px;
}

/* --- Customers --- */
.customer-table-wrapper {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.customer-table th {
  padding: 11px 16px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.65px;
  color: #9ca3af;
  background: #f8f9fb;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  white-space: nowrap;
}

.customer-table td {
  padding: 13px 16px;
  color: #374151;
  border-bottom: 1px solid rgba(0, 0, 0, .04);
  vertical-align: middle;
}

.customer-table tbody tr:last-child td {
  border-bottom: none;
}

.customer-table tbody tr {
  transition: background 180ms ease-out;
}

.customer-table tbody tr:hover {
  background: rgba(241, 88, 43, .03);
}

.customer-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.customer-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F1582B, #ff7a55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
  letter-spacing: 0.3px;
}

.customer-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.customer-info-name {
  font-weight: 600;
  color: #111827;
  font-size: 13px;
}

.customer-info-email {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 1px;
}

.customer-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.customer-badge.vip {
  background: rgba(241, 88, 43, .09);
  color: #F1582B;
}

.customer-badge.new {
  background: rgba(16, 185, 129, .09);
  color: #059669;
}

.customer-badge.returning {
  background: rgba(59, 130, 246, .09);
  color: #2563eb;
}

.customer-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  background: #f8f9fb;
  border-top: 1px solid rgba(0, 0, 0, .06);
  flex-wrap: wrap;
}

.customer-stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #6b7280;
}

.customer-stat-item strong {
  color: #111827;
  font-weight: 700;
}

/* ============================================================
   4. ANALYTICS MODULE
   ============================================================ */

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.analytics-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
  animation: fadeSlideUp 0.38s ease both;
  transition: box-shadow 180ms ease-out;
}

.analytics-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 1px 4px rgba(0, 0, 0, .03);
}

.analytics-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 0;
  margin-bottom: 4px;
}

.analytics-card-title {
  font-size: 13.5px;
  font-weight: 650;
  color: #111827;
  letter-spacing: -0.05px;
}

.analytics-card-action {
  font-size: 11.5px;
  color: #F1582B;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 180ms ease-out;
}

.analytics-card-action:hover {
  opacity: 0.7;
}

.analytics-card-body {
  padding: 14px 20px 20px;
}

/* Conversion Funnel */
.funnel-chart {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px 0;
}

.funnel-step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.funnel-bar-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
}

.funnel-bar {
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  transition: width 0.55s ease;
  position: relative;
  background: linear-gradient(90deg, #F1582B, #ff7a55);
  min-width: 60px;
}

.funnel-step:nth-child(2) .funnel-bar { opacity: 0.82; }
.funnel-step:nth-child(3) .funnel-bar { opacity: 0.66; }
.funnel-step:nth-child(4) .funnel-bar { opacity: 0.50; }
.funnel-step:nth-child(5) .funnel-bar { opacity: 0.36; }

.funnel-label {
  width: 90px;
  font-size: 11.5px;
  color: #6b7280;
  font-weight: 500;
  text-align: right;
}

.funnel-value {
  width: 60px;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
}

.funnel-pct {
  width: 40px;
  font-size: 10.5px;
  color: #9ca3af;
  text-align: right;
}

/* Activity Heatmap */
.heatmap-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: rgba(241, 88, 43, .07);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.2);
  outline: 1.5px solid #F1582B;
  outline-offset: 1px;
}

.heatmap-cell[data-level="1"] { background: rgba(241, 88, 43, .14); }
.heatmap-cell[data-level="2"] { background: rgba(241, 88, 43, .30); }
.heatmap-cell[data-level="3"] { background: rgba(241, 88, 43, .52); }
.heatmap-cell[data-level="4"] { background: rgba(241, 88, 43, .75); }
.heatmap-cell[data-level="5"] { background: rgba(241, 88, 43, 1.00); }

.heatmap-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 8px;
}

.heatmap-legend-label {
  font-size: 10.5px;
  color: #9ca3af;
}

.heatmap-legend-cell {
  width: 11px;
  height: 11px;
  border-radius: 2px;
}

/* Metric Ring (Circular Progress) */
.metric-ring {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-ring-track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    #F1582B calc(var(--pct, 0) * 1%),
    #f3f4f6 0
  );
  mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
  -webkit-mask: radial-gradient(farthest-side, transparent 60%, #000 61%);
}

.metric-ring-value {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  position: relative;
  z-index: 1;
}

.metric-ring-label {
  font-size: 10.5px;
  color: #9ca3af;
  text-align: center;
  margin-top: 5px;
}

.metric-ring-group {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Top Products */
.top-products {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.top-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
  transition: background 180ms ease-out;
}

.top-product-item:last-child {
  border-bottom: none;
}

.top-product-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  flex-shrink: 0;
  background: #f3f4f6;
  color: #6b7280;
}

.top-product-item:nth-child(1) .top-product-rank {
  background: rgba(245, 158, 11, .13);
  color: #d97706;
}
.top-product-item:nth-child(2) .top-product-rank {
  background: rgba(156, 163, 175, .18);
  color: #6b7280;
}
.top-product-item:nth-child(3) .top-product-rank {
  background: rgba(180, 120, 60, .1);
  color: #92400e;
}

.top-product-name {
  flex: 1;
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-product-value {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.top-product-bar {
  width: 56px;
  height: 4px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
}

.top-product-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F1582B, #ff7a55);
  border-radius: 4px;
}

/* Channel Bar (Traffic Sources) */
.channel-bar {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.channel-bar-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-bar-label {
  width: 88px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.channel-bar-track {
  flex: 1;
  height: 7px;
  background: #f3f4f6;
  border-radius: 6px;
  overflow: hidden;
}

.channel-bar-fill {
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #F1582B, #ff7a55);
  transition: width 0.55s ease;
}

.channel-bar-item:nth-child(2) .channel-bar-fill { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.channel-bar-item:nth-child(3) .channel-bar-fill { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.channel-bar-item:nth-child(4) .channel-bar-fill { background: linear-gradient(90deg, #10b981, #34d399); }
.channel-bar-item:nth-child(5) .channel-bar-fill { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.channel-bar-value {
  width: 36px;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  text-align: right;
  flex-shrink: 0;
}

/* ============================================================
   5. ENHANCED TEAM MODULE
   ============================================================ */

.team-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.team-stat-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
}

.team-stat-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .07), 0 1px 3px rgba(0, 0, 0, .04);
  transform: translateY(-1px);
}

.team-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(241, 88, 43, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #F1582B;
  font-size: 19px;
  flex-shrink: 0;
  transition: background 180ms ease-out;
}

.team-stat-card:hover .team-stat-icon {
  background: rgba(241, 88, 43, .13);
}

.team-stat-info-value {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.5px;
  line-height: 1;
}

.team-stat-info-label {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: 4px;
  font-weight: 400;
}

/* Team Grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.team-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
  animation: fadeSlideUp 0.38s ease both;
}

.team-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 1px 4px rgba(0, 0, 0, .03);
  transform: translateY(-2px);
}

.team-card-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F1582B, #ff7a55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .07);
  letter-spacing: 0.3px;
}

.team-card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.team-card-role {
  font-size: 11.5px;
  color: #9ca3af;
  margin-top: -6px;
  font-weight: 400;
}

.workload-bar {
  width: 100%;
  height: 5px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
}

.workload-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.55s ease;
}

.workload-fill.low    { background: #10b981; }
.workload-fill.medium { background: #f59e0b; }
.workload-fill.high   { background: #ef4444; }

.workload-label {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 10.5px;
  color: #9ca3af;
  margin-top: -6px;
}

.team-card-tasks {
  font-size: 11.5px;
  color: #6b7280;
}

.team-card-tasks strong {
  color: #111827;
  font-weight: 700;
}

.team-card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: #9ca3af;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.online  { background: #10b981; animation: pulse-dot 2s infinite; }
.status-dot.away    { background: #f59e0b; }
.status-dot.offline { background: #d1d5db; }

/* Sprint Board (Kanban) */
.sprint-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: start;
}

.sprint-column {
  background: #f8f9fb;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sprint-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  background: #ffffff;
}

.sprint-header-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.55px;
}

.sprint-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 10.5px;
  font-weight: 700;
}

.sprint-column-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.sprint-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 8px;
  padding: 12px;
  cursor: grab;
  transition: box-shadow 180ms ease-out, transform 180ms ease-out;
  position: relative;
}

.sprint-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .04);
  transform: translateY(-1px);
}

.sprint-card:active {
  cursor: grabbing;
}

.sprint-card-title {
  font-size: 12.5px;
  font-weight: 500;
  color: #374151;
  line-height: 1.45;
  margin-bottom: 8px;
}

.sprint-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sprint-card-tag {
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(241, 88, 43, .08);
  color: #F1582B;
  letter-spacing: 0.01em;
}

.sprint-card-priority {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
}

.sprint-card-priority.high   { color: #dc2626; }
.sprint-card-priority.medium { color: #d97706; }
.sprint-card-priority.low    { color: #9ca3af; }

.sprint-card-assignee {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F1582B, #ff7a55);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

.sprint-card-due {
  font-size: 10.5px;
  color: #9ca3af;
}

.sprint-card-due.overdue {
  color: #dc2626;
  font-weight: 600;
}

/* ============================================================
   6. COMMON COMPONENTS
   ============================================================ */

/* Module Header */
.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.module-header-info {
  flex: 1;
  min-width: 0;
}

.module-header-title {
  font-size: 21px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.module-header-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 4px;
  font-weight: 400;
}

.module-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-bar-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  white-space: nowrap;
}

.filter-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .09);
  cursor: pointer;
  transition: all 180ms ease-out;
  white-space: nowrap;
  user-select: none;
}

.filter-chip:hover {
  border-color: #F1582B;
  color: #F1582B;
  background: rgba(241, 88, 43, .03);
}

.filter-chip.active {
  background: #F1582B;
  border-color: #F1582B;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(241, 88, 43, .28);
}

.filter-chip .chip-count {
  font-size: 10.5px;
  opacity: 0.8;
  background: rgba(255, 255, 255, .2);
  padding: 0 4px;
  border-radius: 8px;
  line-height: 1.5;
}

.filter-chip.active .chip-count {
  background: rgba(255, 255, 255, .25);
}

/* Empty State */
.data-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  gap: 12px;
}

.data-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #d1d5db;
  margin-bottom: 4px;
}

.data-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.data-empty-desc {
  font-size: 13px;
  color: #9ca3af;
  max-width: 300px;
  line-height: 1.65;
}

/* Badge variants */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.badge-success {
  background: rgba(16, 185, 129, .09);
  color: #059669;
}

.badge-warning {
  background: rgba(245, 158, 11, .09);
  color: #d97706;
}

.badge-danger {
  background: rgba(239, 68, 68, .09);
  color: #dc2626;
}

.badge-info {
  background: rgba(59, 130, 246, .09);
  color: #2563eb;
}

.badge-accent {
  background: rgba(241, 88, 43, .09);
  color: #F1582B;
}

.badge-neutral {
  background: #f3f4f6;
  color: #6b7280;
}

/* Progress Ring (SVG-based) */
.progress-ring {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-ring svg {
  transform: rotate(-90deg);
}

.progress-ring-track {
  fill: none;
  stroke: #f3f4f6;
}

.progress-ring-fill {
  fill: none;
  stroke: #F1582B;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.55s ease;
}

.progress-ring-label {
  position: absolute;
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  text-align: center;
  line-height: 1.2;
  pointer-events: none;
}

/* Tooltip */
.tooltip-custom {
  position: relative;
  display: inline-block;
}

.tooltip-custom::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1f2937;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  z-index: 999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  letter-spacing: 0.01em;
}

.tooltip-custom::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: #1f2937;
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease-out;
  z-index: 999;
}

.tooltip-custom:hover::after,
.tooltip-custom:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* E-Commerce Sub-Navigation Pills */
.ecom-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.ecom-nav-pill {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, .09);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  background: #f8f9fb;
  color: #6b7280;
  transition: all 180ms ease-out;
}

.ecom-nav-pill:hover {
  color: #374151;
  background: #ffffff;
  border-color: rgba(0, 0, 0, .16);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.ecom-nav-pill.active {
  background: #F1582B;
  color: #fff;
  border-color: #F1582B;
  box-shadow: 0 2px 8px rgba(241, 88, 43, .28);
  font-weight: 600;
}

/* Tab Pills */
.tab-pills {
  display: flex;
  gap: 3px;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 3px;
  width: fit-content;
}

.tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  border: none;
  background: none;
  transition: all 180ms ease-out;
  white-space: nowrap;
}

.tab-pill:hover {
  color: #374151;
}

.tab-pill.active {
  background: #ffffff;
  color: #F1582B;
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .09);
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(
    90deg,
    #f3f4f6 25%,
    #eaebee 50%,
    #f3f4f6 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

.skeleton-text {
  height: 13px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-text.sm  { height: 10px; width: 60%; }
.skeleton-text.md  { height: 13px; width: 80%; }
.skeleton-text.lg  { height: 17px; width: 90%; }
.skeleton-circle {
  border-radius: 50%;
}

/* Live Indicator */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 2s infinite;
}

/* Divider */
.module-divider {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, .06);
  margin: 28px 0;
}

/* Action Button Variants */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease-out;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: #F1582B;
  color: #fff;
  border-color: #F1582B;
}

.btn-primary:hover {
  background: #d94a20;
  border-color: #d94a20;
  box-shadow: 0 3px 10px rgba(241, 88, 43, .35);
}

.btn-secondary {
  background: #ffffff;
  color: #374151;
  border-color: rgba(0, 0, 0, .1);
}

.btn-secondary:hover {
  border-color: #F1582B;
  color: #F1582B;
  background: rgba(241, 88, 43, .03);
}

.btn-ghost {
  background: none;
  color: #6b7280;
  border-color: transparent;
}

.btn-ghost:hover {
  background: #f3f4f6;
  color: #374151;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 7px;
}

.btn-lg {
  padding: 10px 22px;
  font-size: 14px;
  border-radius: 10px;
}

.btn-icon {
  padding: 7px;
  border-radius: 8px;
}

/* Section Panel */
.section-panel {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, .06);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
}

.section-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  gap: 12px;
}

.section-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.1px;
}

.section-panel-body {
  padding: 22px;
}

/* Scrollable table wrapper */
.table-scroll-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, .1) transparent;
}

.table-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}

.table-scroll-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.table-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .1);
  border-radius: 4px;
}

/* ============================================================
   7. RESPONSIVE BREAKPOINTS
   ============================================================ */

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .inventory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

  .ecom-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sprint-board {
    grid-template-columns: repeat(2, 1fr);
  }

  .overview-row {
    flex-direction: column;
  }

  .analytics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .inventory-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .team-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .module-header {
    flex-direction: column;
  }

  .module-header-actions {
    align-self: flex-start;
  }

  .orders-table .col-hide-tablet {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Nav collapses to dropdown */
  .module-nav {
    display: none;
  }

  .module-dropdown {
    display: block;
    margin: 12px 16px;
  }

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

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

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

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

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

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

  .sprint-board {
    grid-template-columns: 1fr;
    overflow-x: auto;
    display: flex;
    gap: 12px;
    padding-bottom: 12px;
  }

  .sprint-column {
    min-width: 260px;
  }

  .orders-table .col-hide-mobile {
    display: none;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .overview-row {
    flex-direction: column;
  }

  .orders-pagination {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .filter-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tab-pills {
    overflow-x: auto;
    width: 100%;
    border-radius: 10px;
  }

  .toolbar-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }

  .kpi-value {
    font-size: 24px;
  }

  .module-header-title {
    font-size: 18px;
  }

  .orders-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .orders-search {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }

  .sprint-board {
    padding-bottom: 8px;
  }
}

/* ============================================================
   8. ANIMATIONS
   ============================================================ */

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.4); }
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Stagger delays for grid cards */
.kpi-card:nth-child(1),
.inventory-card:nth-child(1),
.team-card:nth-child(1),
.analytics-card:nth-child(1) { animation-delay: 0.00s; }

.kpi-card:nth-child(2),
.inventory-card:nth-child(2),
.team-card:nth-child(2),
.analytics-card:nth-child(2) { animation-delay: 0.05s; }

.kpi-card:nth-child(3),
.inventory-card:nth-child(3),
.team-card:nth-child(3),
.analytics-card:nth-child(3) { animation-delay: 0.10s; }

.kpi-card:nth-child(4),
.inventory-card:nth-child(4),
.team-card:nth-child(4),
.analytics-card:nth-child(4) { animation-delay: 0.15s; }

.kpi-card:nth-child(5),
.inventory-card:nth-child(5),
.team-card:nth-child(5) { animation-delay: 0.20s; }

.kpi-card:nth-child(6),
.inventory-card:nth-child(6),
.team-card:nth-child(6) { animation-delay: 0.25s; }

.kpi-card:nth-child(7),
.inventory-card:nth-child(7),
.team-card:nth-child(7) { animation-delay: 0.30s; }

.kpi-card:nth-child(8),
.inventory-card:nth-child(8),
.team-card:nth-child(8) { animation-delay: 0.35s; }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
