/* App-Specific Theme and Components */

/* =============================================
   Custom Color Variables
   ============================================= */
:root {
  /* App-specific colors */
  --color-product-primary: #696cff;
  --color-commission: #71dd5e;
  --color-wallet: #4ecdc4;
  --color-order: #45b7d1;
  --color-storefront: #ffa502;
  --color-danger-custom: #ff6b6b;

  /* Badges */
  --badge-purchase: #e3f2fd;
  --badge-purchase-text: #1976d2;
  --badge-storefront: #f3e5f5;
  --badge-storefront-text: #7b1fa2;

  /* Layout */
  --app-sidebar-width: 17rem;
}

/* =============================================
   App Layout Width
   ============================================= */
.content-wrapper {
  padding-bottom: 0 !important;
}

.content-wrapper > .container-p-y {
  padding-bottom: 1rem !important;
}

@media (min-width: 1200px) {
  .menu-vertical,
  .menu-vertical .menu-block,
  .menu-vertical .menu-inner > .menu-item,
  .menu-vertical .menu-inner > .menu-header,
  .layout-menu {
    width: var(--app-sidebar-width);
  }

  .layout-menu-fixed:not(.layout-menu-collapsed) .layout-page,
  .layout-menu-fixed-offcanvas:not(.layout-menu-collapsed) .layout-page {
    padding-left: var(--app-sidebar-width);
  }

  .layout-navbar-fixed:not(.layout-menu-collapsed) .layout-content-navbar:not(.layout-without-menu) .layout-navbar,
  .layout-menu-fixed.layout-navbar-fixed:not(.layout-menu-collapsed) .layout-content-navbar:not(.layout-without-menu) .layout-navbar,
  .layout-menu-fixed-offcanvas.layout-navbar-fixed:not(.layout-menu-collapsed) .layout-content-navbar:not(.layout-without-menu) .layout-navbar,
  .layout-footer-fixed:not(.layout-menu-collapsed) .layout-wrapper:not(.layout-without-menu) .content-footer {
    left: var(--app-sidebar-width);
  }

  .layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-navbar,
  .layout-menu-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-navbar {
    width: calc(100% - var(--app-sidebar-width) - 3.25rem);
  }
}

/* =============================================
   Sidebar Account Card
   ============================================= */
.sidebar-user-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  margin: 0.75rem 0.9rem 0.85rem;
  padding: 0.75rem 0.65rem;
  border: 1px solid rgba(105, 108, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(105, 108, 255, 0.08), rgba(32, 201, 151, 0.06)),
    #fff;
  box-shadow: 0 0.55rem 1.25rem rgba(67, 89, 113, 0.07);
}

.sidebar-user-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, #20c997, #696cff);
  box-shadow: 0 0.45rem 0.95rem rgba(32, 201, 151, 0.18);
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background-color: #fff;
}

.sidebar-user-avatar::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0.15rem;
  width: 0.7rem;
  height: 0.7rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: #20c997;
}

.sidebar-user-meta {
  min-width: 0;
  padding-right: 1.75rem;
}

.sidebar-user-meta strong,
.sidebar-user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-meta strong {
  color: #233446;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.1;
}

.sidebar-user-meta span {
  margin-top: 0.25rem;
  color: #697a8d;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
}

.sidebar-user-settings {
  position: absolute;
  top: 0.65rem;
  right: 0.55rem;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(105, 108, 255, 0.18);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #696cff;
  transition: all 0.2s ease;
}

.sidebar-user-settings::after {
  content: "";
  position: absolute;
  top: 0.28rem;
  right: 0.28rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background-color: #ff3e1d;
  box-shadow: 0 0 0 2px #fff;
}

.sidebar-user-settings:hover,
.sidebar-user-settings:focus {
  background-color: #696cff;
  color: #fff;
  box-shadow: 0 0.45rem 1rem rgba(105, 108, 255, 0.22);
}

html[data-theme="dark"] .sidebar-user-card {
  border-color: rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(135deg, rgba(32, 201, 151, 0.16), rgba(105, 108, 255, 0.08)),
    #171821;
  box-shadow: 0 0.8rem 1.65rem rgba(0, 0, 0, 0.18);
}

html[data-theme="dark"] .sidebar-user-avatar::after {
  border-color: #171821;
}

html[data-theme="dark"] .sidebar-user-meta strong {
  color: #fff;
}

html[data-theme="dark"] .sidebar-user-meta span {
  color: #c6cad7;
}

html[data-theme="dark"] .sidebar-user-settings {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(255, 255, 255, 0.04);
  color: #c6cad7;
}

html[data-theme="dark"] .sidebar-user-settings::after {
  box-shadow: 0 0 0 2px #171821;
}

html[data-theme="dark"] .sidebar-user-settings:hover,
html[data-theme="dark"] .sidebar-user-settings:focus {
  background-color: #22c55e;
  color: #101218;
  box-shadow: 0 0.45rem 1rem rgba(34, 197, 94, 0.2);
}

/* =============================================
   Mobile Bottom Navigation
   ============================================= */
.app-bottom-nav {
  display: none;
}

@media (max-width: 1199.98px) {
  body {
    padding-bottom: calc(4.85rem + env(safe-area-inset-bottom));
  }

  .app-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1080;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    width: 100%;
    min-height: calc(4.35rem + env(safe-area-inset-bottom));
    padding: 0.45rem 0.75rem calc(0.45rem + env(safe-area-inset-bottom));
    border: 1px solid rgba(105, 108, 255, 0.14);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 12px 12px 0 0;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -0.65rem 1.65rem rgba(67, 89, 113, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .app-bottom-nav-link {
    min-width: 0;
    min-height: 3.1rem;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    border-radius: 8px;
    color: #697a8d;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .app-bottom-nav-link i {
    font-size: 1.35rem;
    line-height: 1;
  }

  .app-bottom-nav-link span {
    overflow: hidden;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-bottom-nav-link:hover,
  .app-bottom-nav-link:focus,
  .app-bottom-nav-link.active {
    background-color: #eef0ff;
    color: #696cff;
  }

  .app-bottom-nav-link.active {
    box-shadow: inset 0 0 0 1px rgba(105, 108, 255, 0.1);
  }

  .buy-now {
    display: none !important;
  }
}

html[data-theme="dark"] .app-bottom-nav {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: rgba(23, 24, 33, 0.94);
  box-shadow: 0 1rem 2.25rem rgba(0, 0, 0, 0.32);
}

html[data-theme="dark"] .app-bottom-nav-link {
  color: #a8b1bd;
}

html[data-theme="dark"] .app-bottom-nav-link:hover,
html[data-theme="dark"] .app-bottom-nav-link:focus,
html[data-theme="dark"] .app-bottom-nav-link.active {
  background-color: rgba(105, 108, 255, 0.18);
  color: #a5a7ff;
}

/* =============================================
   Offer Cards
   ============================================= */
.offer-card {
  transition: all 0.3s ease;
  border: 1px solid #e9ecef;
}

.offer-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.offer-card .badge {
  font-size: 0.7rem;
  padding: 0.35rem 0.65rem;
}

/* =============================================
   Wallet Section
   ============================================= */
.wallet-balance {
  background: linear-gradient(135deg, var(--color-wallet), #5dd9d1);
  color: white;
}

.wallet-balance .badge {
  background-color: rgba(255, 255, 255, 0.3);
}

/* =============================================
   Commission Components
   ============================================= */
.commission-stat {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--color-commission), #8ae66a);
  color: white;
  border-radius: 8px;
}

.commission-stat h4 {
  margin-bottom: 0.5rem;
  font-size: 1.75rem;
}

/* =============================================
   Storefront Preview
   ============================================= */
.storefront-preview {
  background: linear-gradient(135deg, var(--color-storefront), #ffb84d);
  border-radius: 8px;
  overflow: hidden;
}

.storefront-preview-inner {
  background: white;
  border-radius: 0 0 8px 8px;
}

/* =============================================
   Status Badges
   ============================================= */
.badge-purchase {
  background-color: var(--badge-purchase);
  color: var(--badge-purchase-text);
}

.badge-storefront {
  background-color: var(--badge-storefront);
  color: var(--badge-storefront-text);
}

/* =============================================
   Tables Enhanced
   ============================================= */
.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

.table-responsive {
  border-radius: 8px;
  overflow: hidden;
}

/* =============================================
   KPI Cards
   ============================================= */
.kpi-card {
  border-left: 4px solid var(--color-product-primary);
  padding: 1.5rem;
}

.kpi-card.success {
  border-left-color: var(--color-commission);
}

.kpi-card.info {
  border-left-color: var(--color-wallet);
}

.kpi-card.warning {
  border-left-color: var(--color-order);
}

/* =============================================
   Agent Greeting Hero
   ============================================= */
.agent-greeting-hero {
  position: relative;
  overflow: hidden;
  padding: 1.5rem;
  border: 1px solid rgba(105, 108, 255, 0.14);
  border-radius: 0.75rem;
  background:
    linear-gradient(135deg, rgba(105, 108, 255, 0.12), rgba(3, 195, 236, 0.09) 48%, rgba(255, 171, 0, 0.08)),
    #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(67, 89, 113, 0.08);
}

.agent-greeting-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(105, 108, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(105, 108, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, #000, transparent 78%);
}

.agent-greeting-copy {
  position: relative;
  z-index: 1;
}

.agent-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  width: fit-content;
  padding: 0.35rem 0.8rem 0.35rem 0.4rem;
  margin-bottom: 1rem;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.78);
  color: #566a7f;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  box-shadow: inset 0 0 0 1px rgba(105, 108, 255, 0.12);
}

.agent-tier-avatar {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  overflow: hidden;
  border-radius: 50%;
  background-color: #e7e7ff;
}

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

.agent-greeting-copy h1 {
  margin-bottom: 0.625rem;
  color: #384551;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
}

.agent-greeting-copy p {
  max-width: 38rem;
  margin-bottom: 1.25rem;
  color: #697a8d;
  font-size: 1rem;
  line-height: 1.55;
}

.agent-greeting-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.agent-greeting-actions .btn {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 700;
}

.agent-greeting-actions .btn-link {
  padding-right: 0;
  color: #566a7f;
  text-decoration: none;
}

/* =============================================
   Agent Metric Cards
   ============================================= */
.agent-kpi-grid {
  --metric-card-radius: 0.75rem;
}

.agent-metric-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(67, 89, 113, 0.08);
  border-radius: var(--metric-card-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), #fff),
    #fff;
  box-shadow: 0 0.625rem 1.5rem rgba(67, 89, 113, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.agent-metric-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.875rem 1.85rem rgba(67, 89, 113, 0.14);
}

.agent-metric-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 0.2rem;
  background-color: currentColor;
}

.agent-metric-card::after {
  content: "";
  position: absolute;
  top: -3.25rem;
  right: -3.25rem;
  width: 7rem;
  height: 7rem;
  border-radius: 50%;
  background-color: currentColor;
  opacity: 0.08;
  pointer-events: none;
}

.agent-metric-card.metric-primary {
  color: #03a9f4;
}

.agent-metric-card.metric-success {
  color: #20c997;
}

.agent-metric-card.metric-warning {
  color: #f5b400;
}

.agent-metric-card.metric-danger {
  color: #ff4d49;
}

.agent-metric-card .card-body {
  min-height: 12.75rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem;
  text-align: left;
}

.agent-metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.agent-metric-icon {
  width: 2.875rem;
  height: 2.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  font-size: 1.45rem;
  background-color: currentColor;
  color: #fff;
  box-shadow: 0 0.5rem 1rem rgba(67, 89, 113, 0.12);
}

.agent-metric-icon i {
  color: #fff;
}

.metric-primary .agent-metric-icon {
  background-color: #03a9f4;
}

.metric-success .agent-metric-icon {
  background-color: #20c997;
}

.metric-warning .agent-metric-icon {
  background-color: #f5b400;
}

.metric-danger .agent-metric-icon {
  background-color: #ff4d49;
}

.agent-metric-chip {
  max-width: 6.5rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background-color: rgba(67, 89, 113, 0.06);
  color: #697a8d;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
}

.agent-metric-card h3 {
  margin-bottom: 1.15rem;
  color: #243b53;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
}

.agent-metric-card p {
  margin-bottom: 0.45rem;
  color: #697a8d;
  font-size: 0.875rem;
  font-weight: 600;
}

.agent-metric-action {
  width: 100%;
  min-height: 2.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: auto;
  padding: 0 0.875rem;
  border-radius: 0.55rem;
  background-color: rgba(67, 89, 113, 0.05);
  color: #384551;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.agent-metric-action:hover {
  background-color: #eef1f4;
  color: #696cff;
}

.agent-metric-action.is-muted {
  color: #a1acb8;
}

.agent-metric-action.is-muted:hover {
  color: #a1acb8;
}

/* =============================================
   Sales by Network
   ============================================= */
.agent-sales-card {
  border: 0;
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
}

.agent-sales-card .card-header {
  padding: 1.5rem 2rem 1rem;
  border-bottom: 0;
}

.agent-sales-card .card-title {
  color: #243b53;
  font-size: 1.15rem;
  font-weight: 800;
}

.network-chart {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 14rem;
  max-width: 52rem;
  margin: 0 auto;
}

.network-chart-axis {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-bottom: 1.55rem;
  color: #697a8d;
  font-size: 0.75rem;
  text-align: right;
}

.network-bars {
  display: grid;
  grid-template-columns: repeat(4, minmax(3.5rem, 1fr));
  align-items: end;
  gap: 1.5rem;
  min-height: 13rem;
  padding: 0 0.25rem 1.55rem;
  border-left: 1px solid #d9dee3;
  border-bottom: 1px solid #d9dee3;
  background-image: repeating-linear-gradient(to top, #e9ecef 0, #e9ecef 1px, transparent 1px, transparent 25%);
}

.network-bar-item {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 0.65rem;
  color: #697a8d;
  font-size: 0.8125rem;
}

.network-bar {
  width: 100%;
  max-width: 8.5rem;
  min-height: 0.125rem;
  border-radius: 0.375rem 0.375rem 0 0;
}

.network-bar.is-mtn,
.legend-dot.is-mtn {
  background-color: #ffca28;
}

.network-bar.is-telecel,
.legend-dot.is-telecel {
  background-color: #ff4d49;
}

.network-bar.is-ishare,
.legend-dot.is-ishare {
  background-color: #03a9f4;
}

.network-bar.is-bigtime,
.legend-dot.is-bigtime {
  background-color: #9b59b6;
}

.network-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 1rem;
  color: #697a8d;
}

.network-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-dot {
  width: 0.875rem;
  height: 0.875rem;
  display: inline-flex;
  border-radius: 0.25rem;
}

/* =============================================
   Form Enhancements
   ============================================= */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-product-primary);
  box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25);
}

/* =============================================
   Button Hover Effects
   ============================================= */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(105, 108, 255, 0.4);
}

/* =============================================
   Card Shadows
   ============================================= */
.shadow-sm {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

/* =============================================
   Buy Data Page
   ============================================= */
.purchase-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(17rem, 0.55fr);
  gap: 1.25rem;
  align-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(105, 108, 255, 0.18);
  border-radius: 0.5rem;
  padding: 1.35rem;
  background:
    linear-gradient(135deg, rgba(105, 108, 255, 0.14), rgba(3, 169, 244, 0.08) 52%, rgba(40, 199, 111, 0.08)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(90deg, rgba(105, 108, 255, 0.07) 0 1px, transparent 1px 4.5rem);
  box-shadow: 0 0.8rem 2rem rgba(67, 89, 113, 0.09);
}

.purchase-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 3px solid rgba(105, 108, 255, 0.38);
  pointer-events: none;
}

.purchase-hero-copy {
  position: relative;
  z-index: 1;
}

.purchase-hero-copy h4 {
  color: #233446;
  font-size: 1.65rem;
  font-weight: 800;
}

.purchase-hero-copy p {
  max-width: 34rem;
  color: #66758a;
}

.purchase-eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.5rem;
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  background-color: rgba(105, 108, 255, 0.11);
  color: #696cff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.purchase-hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.75rem;
}

.purchase-wallet {
  position: relative;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  overflow: hidden;
  border-radius: 0.5rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.88)),
    linear-gradient(90deg, rgba(105, 108, 255, 0.09), transparent);
  box-shadow: 0 0.65rem 1.4rem rgba(67, 89, 113, 0.11);
}

.purchase-wallet::after {
  content: "";
  position: absolute;
  top: -35%;
  bottom: -35%;
  left: -35%;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: rotate(18deg);
  animation: wallet-shine 4.5s ease-in-out infinite;
}

.purchase-wallet-icon {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  background-color: #eef0ff;
  color: #696cff;
  box-shadow: inset 0 0 0 1px rgba(105, 108, 255, 0.12);
  animation: wallet-float 2.6s ease-in-out infinite;
}

.purchase-wallet-icon::before {
  content: "";
  position: absolute;
  inset: -0.35rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(105, 108, 255, 0.22);
  animation: wallet-pulse 2.6s ease-in-out infinite;
}

.purchase-wallet-icon i {
  font-size: 1.55rem;
}

.purchase-wallet-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.purchase-wallet span,
.purchase-summary-list span,
.purchase-summary-network small,
.network-option small,
.plan-card small,
.purchase-help span {
  color: #697a8d;
}

.purchase-wallet strong {
  color: #233446;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.1;
}

@keyframes wallet-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-0.12rem);
  }
}

@keyframes wallet-pulse {
  0%,
  100% {
    opacity: 0;
    transform: scale(0.88);
  }
  45% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes wallet-shine {
  0%,
  58% {
    left: -35%;
  }
  100% {
    left: 115%;
  }
}

.product-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 1px solid rgba(105, 108, 255, 0.18);
  border-radius: 0.5rem;
  padding: 1.2rem;
  background:
    linear-gradient(135deg, rgba(105, 108, 255, 0.12), rgba(3, 169, 244, 0.06)),
    #fff;
  box-shadow: 0 0.6rem 1.5rem rgba(67, 89, 113, 0.08);
}

.product-hero h4 {
  color: #233446;
  font-weight: 800;
}

.product-balance {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 13rem;
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0.4rem 1rem rgba(67, 89, 113, 0.08);
}

.product-balance i,
.product-summary-top i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background-color: #eef0ff;
  color: #696cff;
  font-size: 1.35rem;
}

.product-balance span,
.product-summary-list span,
.pin-preview span {
  display: block;
  color: #697a8d;
  font-size: 0.8rem;
  font-weight: 600;
}

.product-balance strong,
.product-summary-top strong,
.pin-preview strong {
  color: #233446;
  font-weight: 800;
}

.product-form-card,
.product-summary,
.product-table-card {
  border: 0;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(67, 89, 113, 0.09);
}

.product-form-card .card-header {
  border-bottom: 1px solid #edf0f5;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.product-summary {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
  background-color: #fff;
}

.product-summary-top {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.product-summary-top h5 {
  margin-bottom: 0.1rem;
  color: #233446;
  font-size: 0.95rem;
  font-weight: 800;
}

.product-summary-list,
.pin-preview {
  display: grid;
  gap: 0.65rem;
}

.product-summary-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid #edf0f5;
  padding-top: 0.65rem;
}

.checker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.checker-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 5.25rem;
  border: 1px solid #edf0f5;
  border-radius: 0.5rem;
  padding: 0.85rem;
  background-color: #fff;
  color: #233446;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.checker-card:hover,
.checker-card.active {
  border-color: #696cff;
  transform: translateY(-1px);
  box-shadow: 0 0.45rem 1rem rgba(67, 89, 113, 0.1);
}

.checker-card i {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 0.5rem;
  background-color: #eef0ff;
  color: #696cff;
  font-size: 1.35rem;
}

.checker-card span {
  display: grid;
  gap: 0.15rem;
  flex: 1 1 auto;
}

.checker-card small,
.checker-card em {
  color: #697a8d;
  font-style: normal;
  font-size: 0.8rem;
}

.pin-preview {
  border-top: 1px solid #edf0f5;
  padding-top: 0.8rem;
}

.purchase-builder,
.purchase-summary,
.purchase-help {
  border: 0;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgba(67, 89, 113, 0.09);
}

.purchase-builder .card-body {
  padding: 1.35rem;
}

.purchase-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid #edf0f5;
  padding-bottom: 1.1rem;
}

.purchase-builder-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.purchase-step {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.5rem;
  background-color: #eef0ff;
  color: #696cff;
  font-size: 0.85rem;
  font-weight: 800;
}

.purchase-builder-title h5 {
  color: #233446;
  font-weight: 800;
}

.purchase-section {
  margin-bottom: 1.25rem;
}

.purchase-network-accordion {
  display: grid;
  gap: 0.85rem;
}

.purchase-network-accordion .accordion-item {
  overflow: hidden;
  border: 1px solid #edf0f5;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 0.4rem 1.1rem rgba(67, 89, 113, 0.06);
}

.purchase-network-accordion .accordion-button {
  gap: 0.85rem;
  min-height: 4.8rem;
  padding: 0.9rem 1rem;
  background-color: #fff;
  color: #233446;
  box-shadow: none;
}

.purchase-network-accordion .accordion-button:not(.collapsed) {
  background-color: #fbfcff;
  color: #233446;
}

.purchase-network-accordion .accordion-button:focus {
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgba(105, 108, 255, 0.16);
}

.network-order.active {
  border-color: rgba(105, 108, 255, 0.38);
}

.network-heading-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.network-heading-copy strong {
  color: #233446;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.15;
}

.network-heading-copy small {
  color: #697a8d;
  font-size: 0.8rem;
}

.purchase-network-accordion .accordion-body {
  padding: 1rem;
  border-top: 1px solid #edf0f5;
}

.purchase-network-grid,
.purchase-plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.network-option,
.plan-card,
.purchase-mode {
  border: 1px solid #e7eaf0;
  border-radius: 0.5rem;
  background-color: #fff;
  color: #233446;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.network-option {
  display: flex;
  min-height: 5.35rem;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem;
  text-align: left;
}

.network-option strong,
.network-option small {
  display: block;
  line-height: 1.25;
}

.network-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.45rem;
  height: 2.45rem;
  border-radius: 0.5rem;
  background-color: #f5f7fb;
}

.network-logo img {
  max-width: 1.65rem;
  max-height: 1.65rem;
}

.network-option:hover,
.plan-card:hover,
.purchase-mode:hover {
  transform: translateY(-2px);
  border-color: rgba(105, 108, 255, 0.38);
  box-shadow: 0 0.5rem 1.25rem rgba(67, 89, 113, 0.1);
}

.network-option.active,
.plan-card.active,
.purchase-mode.active {
  border-color: #696cff;
  background-color: #f4f4ff;
  box-shadow: inset 0 0 0 1px rgba(105, 108, 255, 0.14);
}

.purchase-mode-row {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin-bottom: 1.25rem;
  width: 100%;
  max-width: 100%;
  padding: 0.32rem;
  border-radius: 0.5rem;
  border: 1px solid #edf0f5;
  background-color: #f6f7fb;
  overflow-x: auto;
  scrollbar-width: none;
}

.purchase-mode-row::-webkit-scrollbar {
  display: none;
}

.purchase-mode {
  position: relative;
  display: inline-flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  min-height: 2.2rem;
  padding: 0.42rem 0.65rem;
  border-color: transparent;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: none;
  will-change: transform;
}

.purchase-mode i {
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.purchase-mode:hover i,
.purchase-mode.active i {
  transform: translateY(-1px);
}

.purchase-mode.active {
  color: #696cff;
  box-shadow: 0 0.35rem 0.9rem rgba(105, 108, 255, 0.18);
}

.purchase-mode.is-animating {
  animation: purchase-tab-pop 0.24s ease;
}

@keyframes purchase-tab-pop {
  0% {
    transform: scale(0.96);
  }
  70% {
    transform: scale(1.03);
  }
  100% {
    transform: scale(1);
  }
}

.purchase-mode-panel {
  display: none;
}

.purchase-mode-panel.active {
  display: block;
  animation: purchase-panel-in 0.24s ease;
}

@keyframes purchase-panel-in {
  from {
    opacity: 0;
    transform: translateY(0.35rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.purchase-plan-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 4.6rem;
  padding: 0.75rem;
  text-align: left;
  cursor: pointer;
}

.plan-network-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid #edf0f5;
  border-radius: 0.5rem;
  background-color: #fff;
  box-shadow: 0 0.25rem 0.75rem rgba(67, 89, 113, 0.08);
}

.plan-network-logo img {
  max-width: 1.8rem;
  max-height: 1.8rem;
}

.plan-copy {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.plan-card strong {
  color: #0f1f33;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.15;
}

.plan-card .plan-copy small {
  color: #526579;
  font-size: 0.82rem;
  font-weight: 500;
}

.purchase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.purchase-actions .btn {
  min-width: 10rem;
}

.bulk-panel,
.excel-panel {
  margin-bottom: 1.25rem;
  border: 1px solid #edf0f5;
  border-radius: 0.5rem;
  background-color: #fbfcfe;
  padding: 1rem;
}

.bulk-panel-header,
.bulk-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.bulk-panel-header {
  margin-bottom: 0.85rem;
}

.bulk-panel-header small,
.bulk-panel-footer small,
.excel-panel p,
.excel-panel small {
  color: #697a8d;
}

.bulk-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.bulk-textarea {
  min-height: 9.5rem;
  resize: vertical;
}

.bulk-panel-footer {
  margin-top: 0.85rem;
}

.excel-panel {
  display: grid;
  place-items: center;
  min-height: 15rem;
  border-style: dashed;
  border-width: 2px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.excel-panel:hover,
.excel-panel.is-dragging {
  border-color: #696cff;
  background-color: #f6f6ff;
  transform: translateY(-1px);
}

.excel-panel i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background-color: #eef0ff;
  color: #696cff;
  font-size: 1.7rem;
}

.excel-panel h6 {
  margin-bottom: 0.25rem;
}

.excel-panel .btn {
  margin: 0.5rem 0;
}

.purchase-summary {
  top: 1rem;
  padding: 1.25rem;
  background-color: #fff;
}

.purchase-summary-header,
.purchase-summary-network,
.purchase-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.purchase-summary-header {
  margin-bottom: 1rem;
}

.purchase-summary-network {
  justify-content: flex-start;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 0.5rem;
  background-color: #f8f9fb;
}

.purchase-summary-network strong,
.purchase-summary-network small {
  display: block;
}

.purchase-summary-list {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.purchase-summary-list div {
  padding-bottom: 0.7rem;
  border-bottom: 1px solid #edf0f5;
}

.purchase-summary-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.purchase-help {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  padding: 1rem;
  background-color: #fff;
}

.purchase-help i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.5rem;
  background-color: #e7f7ff;
  color: #03a9f4;
  font-size: 1.3rem;
}

.purchase-help strong,
.purchase-help span {
  display: block;
}

/* =============================================
   Responsive Adjustments
   ============================================= */
@media (max-width: 768px) {
  .offer-card {
    margin-bottom: 1.5rem;
  }

  .kpi-card {
    margin-bottom: 1rem;
  }

  .agent-greeting-copy h1 {
    font-size: 1.55rem;
  }

  .agent-kpi-grid {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
  }

  .agent-kpi-grid > [class*='col-'] {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  .agent-metric-card .card-body {
    min-height: 11.75rem;
    padding: 0.8rem;
  }

  .agent-metric-top {
    margin-bottom: 1rem;
  }

  .agent-metric-icon {
    width: 2.45rem;
    height: 2.45rem;
    font-size: 1.2rem;
  }

  .agent-metric-chip {
    max-width: 4.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.68rem;
  }

  .agent-metric-card h3 {
    font-size: 1.08rem;
    margin-bottom: 1rem;
  }

  .agent-metric-card p,
  .agent-metric-action {
    font-size: 0.78rem;
  }

  .agent-sales-card .card-header {
    padding: 1.25rem 1rem 0.75rem;
  }

  .network-chart {
    grid-template-columns: 2.5rem minmax(0, 1fr);
    min-height: 12rem;
  }

  .network-bars {
    grid-template-columns: repeat(4, minmax(2.5rem, 1fr));
    gap: 0.75rem;
    min-height: 11rem;
  }

  .network-legend {
    gap: 0.85rem;
    font-size: 0.8125rem;
  }

  .sticky-top {
    position: static !important;
    margin-top: 2rem;
  }

  .purchase-hero {
    grid-template-columns: 1fr;
    padding: 1.1rem;
  }

  .purchase-hero-copy h4 {
    font-size: 1.35rem;
  }

  .purchase-hero-panel,
  .purchase-wallet {
    min-width: 0;
  }

  .purchase-builder-header,
  .purchase-builder-title {
    align-items: flex-start;
  }

  .purchase-builder-header {
    flex-direction: column;
  }

  .purchase-network-accordion .accordion-button {
    min-height: 4.2rem;
    padding: 0.75rem;
  }

  .purchase-network-accordion .accordion-body {
    padding: 0.8rem;
  }

  .purchase-network-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .purchase-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .network-option {
    min-height: 5rem;
    padding: 0.75rem;
  }

  .purchase-mode {
    min-height: 2.15rem;
    padding: 0.38rem 0.35rem;
    font-size: 0.76rem;
  }

  .purchase-mode i {
    font-size: 0.95rem;
  }

  .plan-card {
    min-height: 4.25rem;
    gap: 0.55rem;
    padding: 0.6rem;
  }

  .plan-network-logo {
    width: 2.35rem;
    height: 2.35rem;
  }

  .plan-network-logo img {
    max-width: 1.5rem;
    max-height: 1.5rem;
  }

  .plan-card strong {
    font-size: 0.92rem;
  }

  .plan-card .plan-copy small {
    font-size: 0.76rem;
  }

  .bulk-panel,
  .excel-panel {
    padding: 0.85rem;
  }

  .bulk-panel-header,
  .bulk-panel-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .bulk-badges {
    justify-content: flex-start;
  }

  .bulk-panel-footer .btn {
    width: 100%;
  }

  .purchase-actions .btn {
    width: 100%;
  }
}

/* =============================================
   Alert Styles
   ============================================= */
.alert-info {
  background-color: #e3f2fd;
  border-color: #90caf9;
  color: #1565c0;
}

.alert-success {
  background-color: #e8f5e9;
  border-color: #81c784;
  color: #2e7d32;
}

/* =============================================
   Badge Colors
   ============================================= */
.badge {
  font-weight: 500;
}

.bg-label-primary {
  background-color: #e7e7ff !important;
  color: #696cff !important;
}

.bg-label-success {
  background-color: #e8f5e9 !important;
  color: #71dd5e !important;
}

.bg-label-info {
  background-color: #e0f2f1 !important;
  color: #4ecdc4 !important;
}

.bg-label-warning {
  background-color: #fff3cd !important;
  color: #ffa502 !important;
}

.bg-label-danger {
  background-color: #ffebee !important;
  color: #ff6b6b !important;
}
