/* Cardfoor dashboard quick actions — category grid inspired by modern wallet/marketplace apps. */

.user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card,
.reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card {
  overflow: hidden !important;
  border: 1px solid #e8eef6 !important;
  border-radius: 18px !important;
  background: #fff !important;
  box-shadow: 0 8px 24px rgba(35, 55, 82, .055) !important;
}

.user-dashboard-page > .row.mb-2 > .col-xl-6:last-child,
.reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child {
  margin-bottom: 22px !important;
}

.user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header,
.reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header {
  display: block !important;
  padding: 14px 16px 8px !important;
  border: 0 !important;
  background: #fff !important;
  color: #26374d !important;
}

.user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header *,
.reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header * {
  color: #26374d !important;
  font-weight: 600 !important;
}

.user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-body,
.reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-body {
  padding: 8px 10px 18px !important;
  background: #fff !important;
}

.user-dashboard-page #most_orders,
.reseller-dashboard-page #most_orders {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)) !important;
  gap: 10px 6px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.user-dashboard-page #most_orders > .list-group-item,
.reseller-dashboard-page #most_orders > .list-group-item {
  position: relative !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  min-height: 108px !important;
  padding: 68px 7px 10px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #25364c !important;
  overflow: hidden !important;
}

.user-dashboard-page #most_orders > .list-group-item:active,
.reseller-dashboard-page #most_orders > .list-group-item:active {
  background: #f4f8fe !important;
}

.user-dashboard-page #most_orders > .list-group-item > .row,
.reseller-dashboard-page #most_orders > .list-group-item > .row {
  position: static !important;
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* The title owns the full card width so it is genuinely centered under the icon. */
.user-dashboard-page #most_orders > .list-group-item > .row > .col:first-child,
.reseller-dashboard-page #most_orders > .list-group-item > .row > .col:first-child {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  padding: 0 2px !important;
  margin: 0 !important;
  font-size: .78rem !important;
  line-height: 1.22 !important;
  font-weight: 600 !important;
  color: #25364c !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}

/* The original arrow column becomes a transparent full-card hit target. */
.user-dashboard-page #most_orders > .list-group-item > .row > .col:last-child,
.reseller-dashboard-page #most_orders > .list-group-item > .row > .col:last-child {
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 100% !important;
}

.user-dashboard-page #most_orders > .list-group-item > .row > .col:last-child > a,
.reseller-dashboard-page #most_orders > .list-group-item > .row > .col:last-child > a {
  position: absolute !important;
  inset: 0 !important;
  z-index: 6 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  font-size: 0 !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

.user-dashboard-page #most_orders > .list-group-item > .row > .col:last-child > a i,
.reseller-dashboard-page #most_orders > .list-group-item > .row > .col:last-child > a i {
  display: none !important;
}

.user-dashboard-page #most_orders > .list-group-item::before,
.reseller-dashboard-page #most_orders > .list-group-item::before {
  position: absolute !important;
  top: 10px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 2 !important;
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #b9d4fb !important;
  border-radius: 50% !important;
  background: #f7fbff !important;
  color: #2f80ed !important;
  font-family: "Font Awesome 5 Free" !important;
  font-weight: 900 !important;
  font-size: 1.35rem !important;
  box-shadow: 0 5px 14px rgba(44, 96, 160, .10) !important;
  pointer-events: none !important;
}

/* Distinct action colors, closer to modern wallet apps. */
.user-dashboard-page #most_orders > .list-group-item:nth-child(1)::before,
.reseller-dashboard-page #most_orders > .list-group-item:nth-child(1)::before {
  color: #2f80ed !important;
  border-color: #a9caff !important;
  background: #edf5ff !important;
}
.user-dashboard-page #most_orders > .list-group-item:nth-child(2)::before,
.reseller-dashboard-page #most_orders > .list-group-item:nth-child(2)::before {
  color: #0f9f92 !important;
  border-color: #9fddd6 !important;
  background: #eefbf8 !important;
}
.user-dashboard-page #most_orders > .list-group-item:nth-child(3)::before,
.reseller-dashboard-page #most_orders > .list-group-item:nth-child(3)::before {
  color: #ef8b2c !important;
  border-color: #ffd0a5 !important;
  background: #fff5e9 !important;
}
.reseller-dashboard-page #most_orders > .list-group-item:nth-child(4)::before {
  color: #8b5cf6 !important;
  border-color: #cbb7ff !important;
  background: #f6f2ff !important;
}
.reseller-dashboard-page #most_orders > .list-group-item:nth-child(5)::before {
  color: #20a464 !important;
  border-color: #a9dfc2 !important;
  background: #effaf4 !important;
}

/* Keep Product information hidden. */
.user-dashboard-page #most_orders > .list-group-item:last-child,
.reseller-dashboard-page #most_orders > .list-group-item:last-child {
  display: none !important;
}

@media (min-width: 1200px) {
  .user-dashboard-page #most_orders,
  .reseller-dashboard-page #most_orders {
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  .user-dashboard-page > .row.mb-2 > .col-xl-6:last-child,
  .reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child {
    margin-bottom: 26px !important;
  }

  .user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header,
  .reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-header {
    display: block !important;
    padding: 14px 14px 7px !important;
  }

  .user-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-body,
  .reseller-dashboard-page > .row.mb-2 > .col-xl-6:last-child > .card > .card-body {
    padding: 6px 5px 16px !important;
  }

  .user-dashboard-page #most_orders,
  .reseller-dashboard-page #most_orders {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px 2px !important;
  }

  .reseller-dashboard-page #most_orders > .list-group-item:nth-child(n+4):not(:last-child) {
    display: flex !important;
  }

  .user-dashboard-page #most_orders > .list-group-item,
  .reseller-dashboard-page #most_orders > .list-group-item {
    min-height: 102px !important;
    padding: 61px 3px 10px !important;
    border-radius: 10px !important;
  }

  .user-dashboard-page #most_orders > .list-group-item::before,
  .reseller-dashboard-page #most_orders > .list-group-item::before {
    top: 8px !important;
    width: 47px !important;
    height: 47px !important;
    border-width: 2px !important;
    font-size: 1.15rem !important;
  }

  .user-dashboard-page #most_orders > .list-group-item > .row > .col:first-child,
  .reseller-dashboard-page #most_orders > .list-group-item > .row > .col:first-child {
    font-size: .64rem !important;
    line-height: 1.18 !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
  }
}


/* Direct shortcut anchors: the whole card is the real link. */
.user-dashboard-page #most_orders > a.cf-shortcut-link,
.reseller-dashboard-page #most_orders > a.cf-shortcut-link {
  text-decoration: none !important;
  cursor: pointer !important;
  color: inherit !important;
  touch-action: manipulation !important;
}
.user-dashboard-page #most_orders > a.cf-shortcut-link > .row > .col:last-child > i,
.reseller-dashboard-page #most_orders > a.cf-shortcut-link > .row > .col:last-child > i {
  display: none !important;
}

/* Shared modern recent orders — user + reseller */
.user-dashboard-page .recent-purchases-card,
.reseller-dashboard-page .recent-purchases-card {
  border: 1px solid #e3e9f4 !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 28px rgba(40, 61, 105, .06) !important;
  background: #fff !important;
}

.user-dashboard-page .recent-purchases-card > .card-header,
.reseller-dashboard-page .recent-purchases-card > .card-header {
  display: flex !important;
  align-items: center !important;
  gap: .55rem !important;
  padding: 1rem 1.05rem !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1f6 !important;
  background: #fff !important;
  color: #1f2a44 !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
}

.user-dashboard-page .recent-purchases-card > .card-header::before,
.reseller-dashboard-page .recent-purchases-card > .card-header::before {
  content: '\f07a';
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #eef3ff;
  color: #4e73df;
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
}

.user-dashboard-page #recent_orders,
.reseller-dashboard-page #recent_orders {
  padding: .58rem !important;
  margin: 0 !important;
  background: #f8fafc !important;
}

.user-dashboard-page #recent_orders .recent-order-item,
.reseller-dashboard-page #recent_orders .recent-order-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(118px, auto) auto !important;
  align-items: center !important;
  gap: .7rem !important;
  margin: 0 0 .5rem !important;
  padding: .72rem .78rem !important;
  border: 1px solid #e7ecf4 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(40, 61, 105, .035) !important;
}

.user-dashboard-page #recent_orders .recent-order-item:last-child,
.reseller-dashboard-page #recent_orders .recent-order-item:last-child {
  margin-bottom: 0 !important;
}

.user-dashboard-page .recent-order-main,
.reseller-dashboard-page .recent-order-main {
  display: flex !important;
  align-items: center !important;
  gap: .68rem !important;
  min-width: 0 !important;
}

.user-dashboard-page .recent-order-icon,
.reseller-dashboard-page .recent-order-icon {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 11px !important;
  background: #eef3ff !important;
  color: #4e73df !important;
  font-size: .9rem !important;
}

.user-dashboard-page .recent-order-copy,
.reseller-dashboard-page .recent-order-copy { min-width: 0 !important; }

.user-dashboard-page .recent-order-product,
.reseller-dashboard-page .recent-order-product {
  color: #202b40 !important;
  font-size: .78rem !important;
  line-height: 1.3 !important;
  font-weight: 900 !important;
  white-space: normal !important;
  word-break: break-word !important;
}

.user-dashboard-page .recent-order-sub,
.reseller-dashboard-page .recent-order-sub {
  margin-top: .18rem !important;
  color: #8a94a6 !important;
  font-size: .62rem !important;
  line-height: 1.25 !important;
}

.user-dashboard-page .recent-order-qty,
.reseller-dashboard-page .recent-order-qty {
  padding: .32rem .48rem !important;
  border-radius: 9px !important;
  background: #eef3ff !important;
  color: #365cca !important;
  font-size: .65rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.user-dashboard-page .recent-order-status,
.reseller-dashboard-page .recent-order-status {
  display: inline-flex !important;
  align-items: center !important;
  gap: .28rem !important;
  padding: .34rem .5rem !important;
  border-radius: 999px !important;
  font-size: .63rem !important;
  font-weight: 900 !important;
  white-space: nowrap !important;
}

.user-dashboard-page .recent-order-status.done,
.reseller-dashboard-page .recent-order-status.done { background: #eaf8f1 !important; color: #177653 !important; }
.user-dashboard-page .recent-order-status.pending,
.reseller-dashboard-page .recent-order-status.pending { background: #fff4dc !important; color: #996300 !important; }

.user-dashboard-page .recent-order-status::before,
.reseller-dashboard-page .recent-order-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}

.user-dashboard-page .recent-order-date,
.reseller-dashboard-page .recent-order-date {
  display: flex !important;
  align-items: center !important;
  gap: .35rem !important;
  color: #69758a !important;
  font-size: .64rem !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
}
.user-dashboard-page .recent-order-date i,
.reseller-dashboard-page .recent-order-date i { color: #8aa0ce !important; }

.user-dashboard-page .recent-order-action,
.reseller-dashboard-page .recent-order-action {
  width: 34px !important;
  height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid #dbe4fb !important;
  border-radius: 10px !important;
  background: #f4f7ff !important;
  color: #365cca !important;
  text-decoration: none !important;
  transition: all .15s ease !important;
}
.user-dashboard-page .recent-order-action:hover,
.reseller-dashboard-page .recent-order-action:hover { background: #eaf0ff !important; transform: translateY(-1px); }

@media (max-width: 767.98px) {
  .user-dashboard-page .recent-purchases-card,
  .reseller-dashboard-page .recent-purchases-card { border-radius: 15px !important; }

  .user-dashboard-page .recent-purchases-card > .card-header,
  .reseller-dashboard-page .recent-purchases-card > .card-header { padding: .82rem .85rem !important; font-size: .82rem !important; }

  .user-dashboard-page .recent-purchases-card > .card-header::before,
  .reseller-dashboard-page .recent-purchases-card > .card-header::before { width: 29px; height: 29px; flex-basis: 29px; border-radius: 9px; }

  .user-dashboard-page #recent_orders,
  .reseller-dashboard-page #recent_orders { padding: .42rem !important; }

  .user-dashboard-page #recent_orders .recent-order-item,
  .reseller-dashboard-page #recent_orders .recent-order-item {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas: 'main qty action' 'status date date' !important;
    gap: .52rem .48rem !important;
    padding: .68rem !important;
    margin-bottom: .42rem !important;
    border-radius: 12px !important;
  }

  .user-dashboard-page .recent-order-main,
  .reseller-dashboard-page .recent-order-main { grid-area: main; }
  .user-dashboard-page .recent-order-qty,
  .reseller-dashboard-page .recent-order-qty { grid-area: qty; }
  .user-dashboard-page .recent-order-status,
  .reseller-dashboard-page .recent-order-status { grid-area: status; justify-self: start; }
  .user-dashboard-page .recent-order-date,
  .reseller-dashboard-page .recent-order-date { grid-area: date; justify-self: end; }
  .user-dashboard-page .recent-order-action,
  .reseller-dashboard-page .recent-order-action { grid-area: action; width: 31px !important; height: 31px !important; border-radius: 9px !important; }
  .user-dashboard-page .recent-order-icon,
  .reseller-dashboard-page .recent-order-icon { width: 34px !important; height: 34px !important; min-width: 34px !important; border-radius: 10px !important; }
  .user-dashboard-page .recent-order-product,
  .reseller-dashboard-page .recent-order-product { font-size: .74rem !important; }
  .user-dashboard-page .recent-order-sub,
  .reseller-dashboard-page .recent-order-sub,
  .user-dashboard-page .recent-order-date,
  .reseller-dashboard-page .recent-order-date { font-size: .59rem !important; }
  .user-dashboard-page .recent-order-status,
  .reseller-dashboard-page .recent-order-status,
  .user-dashboard-page .recent-order-qty,
  .reseller-dashboard-page .recent-order-qty { font-size: .58rem !important; }
}


/* Admin-reference recent orders visual parity — user + reseller */
.user-dashboard-page .recent-purchases-card > .card-header,
.reseller-dashboard-page .recent-purchases-card > .card-header {
  padding: 1rem 1.05rem !important;
  gap: .62rem !important;
  border: 0 !important;
  background: linear-gradient(135deg,#4e73df 0%,#36b9cc 100%) !important;
  color: #fff !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
  letter-spacing: .015em !important;
  text-shadow: 0 1px 1px rgba(15,35,80,.10) !important;
}
.user-dashboard-page .recent-purchases-card > .card-header::before,
.reseller-dashboard-page .recent-purchases-card > .card-header::before {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.17) !important;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12) !important;
}
.user-dashboard-page #recent_orders,
.reseller-dashboard-page #recent_orders { background: #f8fafc !important; }
.user-dashboard-page #recent_orders .recent-order-item,
.reseller-dashboard-page #recent_orders .recent-order-item {
  border: 1px solid #e7ecf4 !important;
  background: #fff !important;
  box-shadow: 0 3px 12px rgba(40,61,105,.035) !important;
}
.user-dashboard-page .recent-order-icon,
.reseller-dashboard-page .recent-order-icon {
  background: #eef3ff !important;
  color: #4e73df !important;
}
.user-dashboard-page .recent-order-action,
.reseller-dashboard-page .recent-order-action {
  border-color: #dbe4fb !important;
  background: #f4f7ff !important;
  color: #365cca !important;
}
@media (max-width:767.98px) {
  .user-dashboard-page .recent-purchases-card > .card-header,
  .reseller-dashboard-page .recent-purchases-card > .card-header {
    padding: .9rem .9rem !important;
    gap: .52rem !important;
    font-size: .86rem !important;
  }
  .user-dashboard-page .recent-purchases-card > .card-header::before,
  .reseller-dashboard-page .recent-purchases-card > .card-header::before {
    width: 31px !important;
    height: 31px !important;
    flex-basis: 31px !important;
    border-radius: 9px !important;
  }
}
