.purchase-content {
  padding-bottom: 64px;
}

.purchase-subtitle {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.purchase-subnav {
  display: grid;
  gap: 6px;
  margin: -1px 0 8px;
  padding-left: 28px;
}

.purchase-subnav button {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  color: #64748b;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 450;
  text-align: left;
  cursor: pointer;
}

.purchase-subnav button:hover {
  color: var(--purple);
  background: #f8fafc;
  border-color: #eef2ff;
}

.purchase-subnav button.is-active {
  color: var(--purple);
  background: #f1f5ff;
  border-color: #e0e7ff;
  font-weight: 560;
}

.browser-shell.is-sidebar-collapsed .purchase-subnav {
  position: fixed;
  left: 78px;
  top: var(--purchase-flyout-top, 246px);
  z-index: 60;
  width: 180px;
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.14);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.browser-shell.is-sidebar-collapsed .purchase-subnav::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 14px;
  width: 10px;
  height: 10px;
  background: #fff;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transform: rotate(45deg);
}

.browser-shell.is-sidebar-collapsed .nav-item[data-nav="purchase"]:hover + .purchase-subnav,
.browser-shell.is-sidebar-collapsed .purchase-subnav:hover,
.browser-shell.is-sidebar-collapsed .purchase-subnav.is-flyout-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.browser-shell.is-sidebar-collapsed .purchase-subnav button {
  height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.purchase-dashboard,
.purchase-manage,
.purchase-grid {
  display: grid;
  gap: 18px;
}

.purchase-dashboard.is-hidden,
.purchase-manage.is-hidden,
.purchase-grid.is-hidden {
  display: none;
}

.purchase-section-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.purchase-section-head h2 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.15;
}

.purchase-section-head span {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 450;
}

.purchase-dashboard .purchase-section-head {
  display: none;
}

.purchase-content[data-active-panel="manage"] > .content-heading {
  display: none;
}

.purchase-content[data-active-panel="generate"] > .content-heading {
  display: none;
}

.purchase-manage .manage-toolbar {
  display: none;
}

.p-action,
.mini-button,
.purchase-secondary {
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 12px;
  color: #475569;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
}

.p-action.is-primary,
.p-action.is-active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.p-action.is-cyan {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.p-action.is-danger {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.p-card,
.purchase-metric-card,
.direction-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.035);
}

.purchase-kpi-grid,
.purchase-manage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.purchase-metric-card {
  min-height: 88px;
  position: relative;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px 18px;
}

.purchase-metric-card > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.purchase-metric-card .lucide-icon {
  width: 18px;
  height: 18px;
}

.purchase-metric-card strong {
  color: #111827;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.purchase-metric-card em {
  width: max-content;
  min-width: 54px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  color: #047857;
  background: #ecfdf5;
  border-radius: 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 560;
}

.purchase-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(260px, 0.9fr);
  gap: 18px;
}

.trend-panel,
.pay-panel {
  min-height: 270px;
}

.rank-panel,
.pending-panel {
  min-height: 250px;
}

.p-card-title {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
}

.p-card-title strong {
  color: #111827;
  font-size: 14px;
  font-weight: 600;
}

.p-card-title span {
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
}

.p-card-title > div,
.purchase-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.purchase-trend-bars {
  min-height: 198px;
  display: grid;
  grid-template-columns: repeat(14, minmax(18px, 1fr));
  align-items: end;
  gap: 12px;
  margin: 0 22px 18px;
  padding-top: 18px;
  overflow-x: auto;
  border-top: 1px solid #eef2f5;
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, #eef2f5 32px);
}

.trend-bar-wrap {
  min-width: 24px;
  height: 170px;
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 7px;
  color: #94a3b8;
  font-size: 10px;
}

.trend-bar-wrap i {
  width: 18px;
  min-height: 18px;
  display: block;
  border-radius: 7px 7px 3px 3px;
  background: var(--teal);
}

.trend-bar-wrap:nth-child(4n) i,
.trend-bar-wrap:nth-child(7n) i {
  background: var(--purple);
}

.pay-layout {
  display: grid;
  grid-template-columns: minmax(116px, 150px) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 18px;
}

.pay-ring {
  width: 128px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  justify-self: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #fff 0 48%, transparent 49%),
    conic-gradient(var(--purple) 0 72%, var(--teal) 72% 94%, #e5e7eb 94% 100%);
}

.pay-ring strong {
  color: #111827;
  font-size: 22px;
  font-weight: 600;
}

.pay-ring span {
  color: #64748b;
  font-size: 11px;
}

.pay-legend,
.buyer-rank-list,
.pending-list {
  display: grid;
  gap: 12px;
}

.pay-legend-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 12px;
}

.pay-legend-row i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.buyer-rank-list,
.pending-list {
  padding: 2px 18px 18px;
}

.buyer-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(68px, 0.65fr) minmax(90px, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 12px;
}

.buyer-rank-row em,
.pending-index {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: #eef2ff;
  border-radius: 8px;
  font-style: normal;
  font-weight: 650;
}

.buyer-rank-row span {
  min-width: 0;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-rank-row i {
  height: 6px;
  overflow: hidden;
  background: #eef2f5;
  border-radius: 999px;
}

.buyer-rank-row i b {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.buyer-rank-row:first-child i b {
  background: var(--purple);
}

.buyer-rank-row strong {
  color: #475569;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.pending-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  color: #475569;
  font-size: 12px;
}

.pending-row strong {
  display: block;
  color: #111827;
  font-size: 12px;
  font-weight: 560;
}

.pending-row span {
  color: #64748b;
  font-size: 11px;
}

.manage-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 340px) repeat(3, auto) minmax(16px, 1fr) auto auto auto;
  align-items: center;
  gap: 10px;
}

.manage-search,
.card-search {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.manage-search input,
.card-search input {
  width: 100%;
  min-width: 0;
  color: #111827;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 12px;
}

.purchase-manage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  height: calc(100vh - 236px);
  min-height: 420px;
  overflow: hidden;
}

.manage-table-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.purchase-table {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0 18px 18px;
  overflow: auto;
}

.purchase-table-row {
  min-width: 420px;
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(130px, 1.2fr) minmax(72px, 0.7fr) minmax(88px, 0.8fr) minmax(72px, 0.6fr);
  align-items: center;
  gap: 10px;
  padding: 0 2px;
  color: #475569;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}

.purchase-table-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 650;
}

.purchase-table-row.is-editable {
  cursor: pointer;
}

.purchase-table-row.is-editable:hover {
  background: #f8faff;
}

.manage-category-filter {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.manage-category-filter select {
  height: 32px;
  min-width: 132px;
  padding: 0 30px 0 11px;
  color: #374151;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  font: inherit;
  font-size: 12px;
}

.purchase-grid {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) minmax(0, 0.8fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  align-items: stretch;
  height: calc(100vh - 138px);
  overflow: hidden;
}

.purchase-grid > .purchase-section-head,
.purchase-grid > .generate-steps {
  grid-column: 1 / -1;
}

.purchase-wizard {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 18px;
  height: auto;
  min-height: calc(100vh - 138px);
  overflow: visible;
  padding-bottom: 72px;
}

.purchase-wizard-stage {
  min-height: 0;
  display: grid;
  place-items: start center;
  overflow: hidden;
}

.wizard-card {
  width: min(860px, 100%);
  height: 100%;
  min-height: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.wizard-card.is-active {
  display: flex;
}

.wizard-card.purchase-products-card,
.wizard-card.purchase-cart-card,
.wizard-card.purchase-info-card {
  max-width: 100%;
}

.wizard-card .purchase-products,
.wizard-card .cart-list {
  flex: 1 1 auto;
  min-height: 0;
}

.wizard-next,
.wizard-card > .purchase-submit,
.wizard-card > .purchase-secondary {
  flex: 0 0 auto;
  margin-top: 16px;
}

.purchase-wizard .wizard-card:not(.is-active) {
  display: none !important;
}

.generate-steps {
  min-height: 40px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  align-items: center;
  padding: 0 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.step {
  min-height: 38px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: #475569;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 560;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 124px;
  right: 26px;
  top: 50%;
  height: 2px;
  background: #e5e7eb;
  border-radius: 999px;
  transform: translateY(-50%);
}

.step.is-active:not(:last-child)::after {
  background: var(--purple);
}

.step em {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #6b7280;
  background: #e2e8f0;
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.step.is-active {
  color: #111827;
}

.step.is-active em {
  color: #fff;
  background: var(--purple);
}

.step.is-current em {
  box-shadow: 0 0 0 6px rgba(91, 92, 226, 0.1);
}

.step.is-complete em {
  color: #fff;
  background: #25c4c5;
}

.purchase-products-card,
.purchase-info-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px;
}

.purchase-cart-card {
  align-self: start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  padding: 18px;
}

.purchase-card-head {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.purchase-card-head h2 {
  position: static;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 560;
}

.purchase-card-head h2 small {
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
}

.purchase-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.purchase-tab {
  flex: 0 0 auto;
  height: 30px;
  padding: 0 12px;
  color: #64748b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.purchase-tab.is-active {
  color: var(--purple);
  background: #f4f5ff;
  border-color: rgba(91, 92, 226, 0.28);
}

.purchase-products {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.cart-list {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: stretch;
  gap: 10px;
  overflow-y: auto;
  padding-right: 2px;
}

.purchase-cart-card .cart-list {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  grid-column: 1 / -1;
  max-height: calc(100vh - 362px);
  min-height: 0;
  overflow-x: hidden;
}

.purchase-cart-card .price-warning {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex: 0 0 auto;
  grid-column: 1 / -1;
  box-sizing: border-box;
}

.purchase-cart-card .empty-state {
  position: static;
  inset: auto;
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  overflow: hidden;
  white-space: normal;
  word-break: keep-all;
}

.purchase-product {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 10px;
}

.purchase-product.is-selected {
  background: #f8faff;
  border-color: #d8ddfc;
}

.product-title-row,
.product-bottom {
  display: contents;
}

.product-title-row strong {
  color: #111827;
  font-size: 12px;
  font-weight: 560;
}

.product-category,
.product-meta span:nth-child(2),
.product-price {
  display: none;
}

.product-meta {
  grid-column: 1;
  color: #64748b;
  font-size: 10px;
}

.quantity-control {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quantity-control button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: #f4f5ff;
  border: 1px solid rgba(91, 92, 226, 0.16);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
}

.quantity-control span {
  min-width: 18px;
  color: #111827;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
}

.cart-line strong {
  color: #111827;
  font-size: 12px;
  font-weight: 560;
}

.cart-line span {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 11px;
}

.cart-line em {
  color: #111827;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.cart-edit-line {
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(96px, 0.45fr));
  align-items: end;
}

.cart-item-title {
  min-width: 0;
}

.cart-edit-line label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 10px;
  font-weight: 520;
}

.cart-edit-line input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  color: #111827;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 560;
}

.cart-edit-line input:focus {
  border-color: rgba(91, 92, 226, 0.5);
  box-shadow: 0 0 0 3px rgba(91, 92, 226, 0.1);
}

.price-warning {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 12px 14px;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.45;
}

.price-warning strong {
  font-size: 12px;
  font-weight: 600;
}

.order-fields {
  display: grid;
  gap: 8px;
}

.order-fields label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
}

.order-fields input {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  font-size: 12px;
}

.order-summary {
  display: grid;
  gap: 14px;
  margin: 28px 0 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.order-summary div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

.order-summary strong {
  color: #111827;
  font-weight: 600;
}

.purchase-submit {
  width: 100%;
  height: 38px;
  margin-top: auto;
  color: #fff;
  background: var(--purple);
  border: 1px solid var(--purple);
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
}

.purchase-submit:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.purchase-secondary {
  width: 100%;
  margin-top: 8px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 560;
  text-align: center;
}

.purchase-content .empty-state {
  position: static;
  inset: auto;
}

.empty-state.compact {
  min-height: 88px;
}

.purchase-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(6px);
}

.purchase-modal[hidden] {
  display: none;
}

.purchase-modal-panel {
  width: min(560px, 100%);
  max-height: min(720px, 88vh);
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
}

.purchase-success-panel {
  width: min(360px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 34px 30px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
}

.success-check {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(180deg, #25c4c5 0%, #5b5ce2 100%);
  border-radius: 50%;
  box-shadow: 0 18px 30px rgba(91, 92, 226, 0.22);
}

.success-check .lucide-icon,
.success-check svg {
  width: 34px;
  height: 34px;
}

.purchase-success-panel h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 650;
}

.purchase-success-panel .purchase-submit {
  margin-top: 2px;
}

.confirm-list {
  max-height: 320px;
}

.purchase-note {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: #64748b;
  font-size: 12px;
  font-weight: 650;
}

.purchase-note textarea {
  min-height: 82px;
  resize: vertical;
  padding: 10px 12px;
  color: #111827;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  font: inherit;
}

.product-detail-panel {
  width: min(460px, 100%);
}

.product-detail-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.product-detail-form label:first-child {
  grid-column: 1 / -1;
}

.product-detail-form label {
  display: grid;
  gap: 7px;
  color: #64748b;
  font-size: 12px;
  font-weight: 560;
}

.product-detail-form input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  color: #111827;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: 0;
  font: inherit;
  font-size: 13px;
}

.order-detail-panel {
  width: min(520px, 100%);
}

.order-detail-body {
  min-height: 0;
  overflow: auto;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.detail-grid div {
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 560;
}

.detail-grid strong {
  color: #111827;
  font-size: 13px;
  font-weight: 600;
  word-break: break-word;
}

.detail-hint {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.order-detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.order-detail-actions[hidden] {
  display: none;
}

.purchase-secondary.is-danger {
  color: #b91c1c;
  background: #fff1f2;
  border-color: #fecaca;
}

.purchase-wizard {
  gap: 16px;
  height: auto;
  min-height: calc(100vh - 138px);
  overflow: visible;
  padding-bottom: 72px;
}

.purchase-wizard .generate-head {
  min-height: 28px;
}

.purchase-wizard .generate-steps {
  min-height: 42px;
  padding: 0 18px;
  border-color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.03);
}

.purchase-wizard-stage {
  align-items: start;
  justify-items: center;
  min-height: 668px;
  overflow: visible;
}

.purchase-wizard .wizard-card {
  width: min(680px, 100%);
  height: 530px;
  min-height: 530px;
  max-height: 530px;
  padding: 24px;
  border-radius: 12px;
  border-color: #e5e7eb;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.purchase-wizard .purchase-products-card {
  height: 650px;
  min-height: 650px;
  max-height: 650px;
}

.purchase-wizard .purchase-cart-card {
  height: auto;
  min-height: 300px;
  max-height: none;
}

.purchase-wizard .purchase-card-head {
  min-height: 24px;
  margin-bottom: 14px;
}

.purchase-wizard .purchase-card-head h2 {
  gap: 9px;
  font-size: 16px;
  font-weight: 600;
}

.purchase-wizard .purchase-card-head h2 small {
  font-size: 11px;
  font-weight: 450;
}

.product-control-bar {
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(220px, 0.88fr);
  align-items: center;
  gap: 0;
  margin: 0 0 14px;
  padding: 0;
  background: #fff;
  border: 1px solid #d8ddfc;
  border-radius: 13px;
  box-shadow: 0 6px 18px rgba(91, 92, 226, 0.08);
}

.purchase-search-premium {
  height: 100%;
  margin: 0;
  padding: 0 5px 0 7px;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-radius: 0 12px 12px 0;
  box-shadow: none;
}

.purchase-search-premium .lucide-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--purple);
  background: transparent;
  border-radius: 8px;
}

.purchase-search-premium input {
  height: 100%;
  min-width: 0;
  font-size: 12px;
}

.card-search-button {
  width: 54px;
  height: 100%;
  flex: 0 0 auto;
  color: #fff;
  background: var(--purple);
  border: 0;
  border-radius: 0 12px 12px 0;
  font-size: 12px;
  font-weight: 600;
}

.purchase-wizard .purchase-tabs {
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(var(--category-count, 4), minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding-bottom: 0;
  overflow: hidden;
  border-radius: 12px 0 0 12px;
}

.purchase-wizard .purchase-tab {
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 8px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.purchase-wizard .purchase-tab.is-active {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.purchase-wizard .purchase-products {
  height: 398px;
  flex: 0 0 398px;
  display: grid;
  align-content: start;
  gap: 0;
  overflow-y: auto;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
}

.purchase-wizard .purchase-product {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 150px) auto;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 4px 12px;
  background: #fff;
  border: 0;
  border-radius: 8px;
}

.purchase-wizard .purchase-product:nth-child(even) {
  background: #f8fafc;
}

.purchase-wizard .purchase-product.is-selected {
  background: #f4f5ff;
}

.purchase-wizard .product-title-row,
.purchase-wizard .product-bottom {
  display: contents;
}

.purchase-wizard .product-title-row strong {
  grid-column: 1;
  color: #111827;
  font-size: 12px;
  font-weight: 520;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-wizard .product-meta {
  grid-column: 2;
  grid-row: 1;
  color: #64748b;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-wizard .quantity-control {
  grid-column: 3;
  grid-row: 1;
  gap: 8px;
}

.purchase-wizard .quantity-control button {
  width: 26px;
  height: 24px;
  border-radius: 7px;
}

.purchase-wizard .quantity-control span {
  min-width: 16px;
  font-size: 12px;
  font-weight: 600;
}

.wizard-action-bar {
  height: 46px;
  flex: 0 0 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: auto;
  padding: 0;
  color: #64748b;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 520;
}

.wizard-action-bar [data-selection-hint] {
  display: none;
}

.wizard-action-bar .purchase-submit {
  width: 118px;
  height: 32px;
  flex: 0 0 auto;
  margin: 0;
}

.purchase-wizard .purchase-cart-card .cart-list {
  height: auto;
  min-height: 150px;
  flex: 0 0 auto;
  max-height: none;
  gap: 0;
  overflow-y: auto;
  padding: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
}

.purchase-wizard .cart-edit-line {
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) 72px 82px 90px;
  gap: 10px;
  align-items: center;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
}

.purchase-wizard .cart-edit-line:nth-child(even) {
  background: #f8fafc;
}

.purchase-wizard .cart-line strong {
  font-weight: 520;
}

.purchase-wizard .cart-line span {
  margin-top: 3px;
}

.purchase-wizard .cart-edit-line label {
  gap: 3px;
}

.purchase-wizard .cart-edit-line input {
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 520;
}

.purchase-wizard .purchase-cart-card .price-warning {
  height: 44px;
  flex: 0 0 44px;
  display: flex;
  align-items: center;
  margin-top: 16px;
  padding: 0 14px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.4;
}

.purchase-wizard .purchase-cart-card > .purchase-submit {
  width: 136px;
  height: 32px;
  align-self: flex-end;
  margin-top: 12px;
}

.purchase-wizard .purchase-info-card {
  height: auto;
  min-height: 530px;
}

.purchase-wizard .purchase-info-card .purchase-submit,
.purchase-wizard .purchase-info-card .purchase-secondary {
  height: 36px;
}

.purchase-wizard .generate-steps {
  min-height: 70px;
  padding: 0 28px;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.purchase-wizard .step {
  min-height: 70px;
  justify-content: center;
  align-items: flex-start;
  padding-top: 14px;
}

.purchase-wizard .step.is-clickable {
  cursor: pointer;
}

.purchase-wizard .step.is-clickable:hover em {
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(92, 91, 229, 0.12);
}

.purchase-wizard .step.is-clickable:focus-visible em {
  outline: 2px solid rgba(92, 91, 229, 0.45);
  outline-offset: 3px;
}

.purchase-wizard .step:not(:last-child)::after {
  left: calc(50% + 13px);
  right: calc(-50% + 13px);
  top: 27px;
  height: 3px;
  background: #e5e7eb;
  z-index: 0;
}

.purchase-wizard .step.is-active:not(:last-child)::after {
  background: #e5e7eb;
}

.purchase-wizard .step.is-complete:not(:last-child)::after {
  background: #22c7c8;
}

.purchase-wizard .step span {
  position: absolute;
  top: 45px;
  left: 50%;
  width: 96px;
  color: #64748b;
  font-size: 11px;
  font-weight: 450;
  text-align: center;
  transform: translateX(-50%);
}

.purchase-wizard .step em {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.purchase-wizard .step.is-current span {
  color: #111827;
  font-weight: 600;
}

.purchase-wizard .step.is-current em {
  color: #fff;
  background: var(--purple);
  border-color: var(--purple);
}

.purchase-wizard .step.is-complete span {
  color: #0f766e;
  font-weight: 450;
}

.purchase-wizard .step.is-complete em {
  color: #0f766e;
  background: #dff9f9;
  border-color: #22c7c8;
}

.purchase-wizard .purchase-info-card {
  width: min(600px, 100%);
  height: 540px;
  min-height: 540px;
  max-height: 540px;
  padding: 26px 36px;
}

.purchase-wizard .purchase-info-card .purchase-card-head {
  min-height: 42px;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf0f5;
}

.purchase-wizard .purchase-info-card .purchase-card-head h2 {
  gap: 12px;
  font-size: 17px;
}

.purchase-wizard .purchase-info-card .order-fields {
  width: min(360px, 100%);
  justify-self: center;
  gap: 14px;
  margin: 0 auto;
}

.purchase-wizard .purchase-info-card .order-fields label {
  width: 100%;
  display: grid;
  grid-template-columns: 92px minmax(0, 220px);
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: left;
}

.purchase-wizard .purchase-info-card .order-fields input {
  width: 220px;
  height: 34px;
  font-size: 12px;
  font-weight: 500;
}

.purchase-wizard .purchase-info-card .order-fields label:nth-child(-n + 3) {
  width: 100%;
}

.purchase-wizard .purchase-info-card .order-fields label:nth-child(-n + 3) input {
  width: 220px;
  height: auto;
  padding: 0;
  color: #111827;
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
  font-weight: 560;
}

.purchase-wizard .purchase-info-card .order-fields label:nth-child(4),
.purchase-wizard .purchase-info-card .order-fields label:nth-child(5) {
  width: 100%;
}

.purchase-wizard .purchase-info-card .order-fields label:nth-child(4) input,
.purchase-wizard .purchase-info-card .order-fields label:nth-child(5) input {
  width: 220px;
}

.purchase-wizard .purchase-info-card .order-summary {
  gap: 14px;
  margin: 36px 0 0;
  padding-top: 18px;
}

.purchase-wizard .purchase-info-card .order-summary div {
  align-items: center;
}

.purchase-wizard .purchase-info-card .order-summary strong {
  min-width: 112px;
  text-align: right;
}

.summary-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
  padding-right: 0;
}

.summary-actions .purchase-secondary,
.summary-actions .purchase-submit {
  height: 32px;
  margin: 0;
}

.summary-actions .purchase-secondary {
  width: 128px;
}

.summary-actions .purchase-submit {
  width: 100px;
}

.purchase-wizard .purchase-success-card {
  width: min(1032px, 100%);
  height: 530px;
  min-height: 530px;
  max-height: 530px;
  position: relative;
  padding: 0;
}

.wizard-creating {
  position: absolute;
  top: 70px;
  left: 0;
  right: 0;
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.inline-success {
  position: absolute;
  top: 132px;
  left: 50%;
  width: 340px;
  height: 296px;
  transform: translateX(-50%);
  padding: 36px 48px 20px;
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(17, 24, 39, 0.12);
}

.inline-success[hidden] {
  display: none;
}

.inline-success .success-check {
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  background: linear-gradient(135deg, #5b5ce2 0%, #22c7c8 100%);
  border: 0;
  box-shadow: none;
  cursor: pointer;
}

.inline-success .success-check:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(91, 92, 226, 0.16);
}

.inline-success .success-check:focus-visible {
  outline: 3px solid rgba(91, 92, 226, 0.22);
  outline-offset: 4px;
}

.inline-success .success-check .lucide-icon,
.inline-success .success-check svg {
  width: 38px;
  height: 38px;
  stroke-width: 3;
}

.inline-success h2 {
  margin: 0;
  font-size: 20px;
}

.success-amounts {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  color: #64748b;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
}

.success-amounts span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.success-amounts strong {
  color: #111827;
  font-weight: 650;
}

.inline-success p {
  width: 244px;
  margin: 14px auto 18px;
  color: #64748b;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.5;
  text-align: center;
}

.inline-success .purchase-submit {
  width: 148px;
  height: 36px;
  margin: 0 auto;
}

/* ui.pen shadcn-style trial for the purchase creation wizard */
.purchase-content[data-active-panel="generate"] {
  background: #fafafa;
}

.purchase-content[data-active-panel="generate"] .purchase-wizard {
  --kit-card: #ffffff;
  --kit-text: #0a0a0a;
  --kit-muted: #737373;
  --kit-border: #e5e5e5;
  --kit-input: #e5e5e5;
  --kit-secondary: #f5f5f5;
  --kit-primary: #7c3aed;
  --kit-primary-soft: #f5f3ff;
  max-width: 1120px;
  margin: 0 auto;
  gap: 18px;
}

.purchase-content[data-active-panel="generate"] .generate-head h2 {
  color: var(--kit-text);
  font-size: 18px;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .generate-steps {
  min-height: 72px;
  padding: 0 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.purchase-content[data-active-panel="generate"] .step:not(:last-child)::after {
  height: 2px;
  background: var(--kit-border);
}

.purchase-content[data-active-panel="generate"] .step.is-complete:not(:last-child)::after {
  background: var(--kit-primary);
}

.purchase-content[data-active-panel="generate"] .step span {
  color: var(--kit-muted);
  font-size: 11px;
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .step.is-current span {
  color: var(--kit-text);
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .step.is-complete span {
  color: var(--kit-primary);
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .step em {
  width: 28px;
  height: 28px;
  color: #64748b;
  background: #fafafa;
  border: 1px solid #cbd5e1;
  box-shadow: 0 1px 1.75px rgba(0, 0, 0, 0.05);
}

.purchase-content[data-active-panel="generate"] .step.is-current em {
  color: #fff;
  background: var(--kit-primary);
  border-color: var(--kit-primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.purchase-content[data-active-panel="generate"] .step.is-complete em {
  color: var(--kit-primary);
  background: #fff;
  border-color: var(--kit-primary);
}

.purchase-content[data-active-panel="generate"] .wizard-card {
  color: var(--kit-text);
  background: var(--kit-card);
  border: 1px solid var(--kit-border);
  border-radius: 8px;
  box-shadow: 0 1px 1.75px rgba(0, 0, 0, 0.05);
}

.purchase-content[data-active-panel="generate"] .purchase-products-card {
  width: min(720px, 100%);
  height: 660px;
  min-height: 660px;
  max-height: 660px;
  padding: 24px;
}

.purchase-content[data-active-panel="generate"] .purchase-card-head {
  margin-bottom: 14px;
  padding: 0;
  border: 0;
}

.purchase-content[data-active-panel="generate"] .purchase-card-head h2 {
  color: var(--kit-text);
  font-size: 18px;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .purchase-card-head h2 small {
  color: var(--kit-muted);
  font-size: 12px;
  font-weight: 400;
}

.purchase-content[data-active-panel="generate"] .product-control-bar {
  height: 44px;
  grid-template-columns: minmax(260px, 1fr) minmax(240px, 0.82fr);
  overflow: hidden;
  background: var(--kit-secondary);
  border: 1px solid var(--kit-border);
  border-radius: 8px;
  box-shadow: none;
}

.purchase-content[data-active-panel="generate"] .purchase-tabs {
  height: 100%;
  padding: 4px;
  border-radius: 8px 0 0 8px;
}

.purchase-content[data-active-panel="generate"] .purchase-tab {
  color: var(--kit-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .purchase-tab.is-active {
  color: var(--kit-text);
  background: #fff;
  border: 0;
  box-shadow: 0 1px 1.75px rgba(0, 0, 0, 0.05);
}

.purchase-content[data-active-panel="generate"] .purchase-search-premium {
  background: #fff;
  border-left: 1px solid var(--kit-border);
  border-radius: 0 8px 8px 0;
}

.purchase-content[data-active-panel="generate"] .purchase-search-premium .lucide-icon {
  width: 18px;
  height: 18px;
  color: var(--kit-muted);
}

.purchase-content[data-active-panel="generate"] .purchase-search-premium input {
  color: var(--kit-text);
  font-size: 13px;
}

.purchase-content[data-active-panel="generate"] .card-search-button,
.purchase-content[data-active-panel="generate"] .purchase-submit {
  color: #fff;
  background: var(--kit-primary);
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .card-search-button {
  width: 62px;
  height: 32px;
  align-self: center;
  margin-right: 4px;
}

.purchase-content[data-active-panel="generate"] .purchase-products {
  height: 430px;
  flex-basis: 430px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--kit-border);
  border-radius: 8px;
}

.purchase-content[data-active-panel="generate"] .purchase-product {
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  border-radius: 6px;
}

.purchase-content[data-active-panel="generate"] .purchase-product:nth-child(even) {
  background: #fafafa;
}

.purchase-content[data-active-panel="generate"] .purchase-product.is-selected {
  background: var(--kit-primary-soft);
}

.purchase-content[data-active-panel="generate"] .product-title-row strong {
  color: var(--kit-text);
  font-size: 13px;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .product-meta {
  color: var(--kit-muted);
  font-size: 12px;
}

.purchase-content[data-active-panel="generate"] .quantity-control button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #fff;
  background: var(--kit-primary);
  border: 1px solid var(--kit-primary);
  border-radius: 6px;
  box-shadow: 0 1px 1.75px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}

.purchase-content[data-active-panel="generate"] .quantity-control span {
  color: var(--kit-text);
  font-size: 13px;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .quantity-control input {
  width: 38px;
  height: 30px;
  padding: 0 4px;
  color: var(--kit-text);
  background: #fff;
  border: 1px solid var(--kit-border);
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
  line-height: 30px;
  text-align: center;
  -moz-appearance: textfield;
}

.purchase-content[data-active-panel="generate"] .quantity-control input::-webkit-outer-spin-button,
.purchase-content[data-active-panel="generate"] .quantity-control input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.purchase-content[data-active-panel="generate"] .quantity-control input:focus {
  border-color: var(--kit-primary);
  outline: 3px solid rgba(124, 58, 237, 0.12);
  outline-offset: 0;
}

.purchase-content[data-active-panel="generate"] .wizard-action-bar {
  height: 48px;
  margin-top: auto;
}

.purchase-content[data-active-panel="generate"] .wizard-action-bar .purchase-submit {
  width: 136px;
  height: 36px;
}

.purchase-content[data-active-panel="generate"] .purchase-cart-card {
  width: min(720px, 100%);
  min-height: 360px;
  padding: 24px;
}

.purchase-content[data-active-panel="generate"] .purchase-cart-card .cart-list {
  min-height: 180px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--kit-border);
  border-radius: 8px;
}

.purchase-content[data-active-panel="generate"] .cart-edit-line {
  min-height: 46px;
  border-radius: 6px;
}

.purchase-content[data-active-panel="generate"] .cart-edit-line:nth-child(even) {
  background: #fafafa;
}

.purchase-content[data-active-panel="generate"] .cart-line strong {
  color: var(--kit-text);
  font-size: 13px;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .cart-line span,
.purchase-content[data-active-panel="generate"] .cart-edit-line label {
  color: var(--kit-muted);
  font-size: 12px;
}

.purchase-content[data-active-panel="generate"] .cart-edit-line input,
.purchase-content[data-active-panel="generate"] .purchase-info-card .order-fields input {
  color: var(--kit-text);
  background: #fff;
  border: 1px solid var(--kit-input);
  border-radius: 6px;
  box-shadow: none;
}

.purchase-content[data-active-panel="generate"] .price-warning {
  color: #854d0e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

.purchase-content[data-active-panel="generate"] .mini-button,
.purchase-content[data-active-panel="generate"] .purchase-secondary {
  color: var(--kit-text);
  background: #fff;
  border: 1px solid var(--kit-border);
  border-radius: 6px;
  box-shadow: 0 1px 1.75px rgba(0, 0, 0, 0.05);
  font-size: 13px;
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .purchase-info-card {
  width: min(600px, 100%);
  height: 540px;
  min-height: 540px;
  max-height: 540px;
  padding: 26px 36px;
}

.purchase-content[data-active-panel="generate"] .purchase-info-card .purchase-card-head {
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--kit-border);
}

.purchase-content[data-active-panel="generate"] .purchase-info-card .order-fields label span,
.purchase-content[data-active-panel="generate"] .purchase-info-card .order-summary span {
  color: var(--kit-muted);
  font-size: 12px;
  font-weight: 500;
}

.purchase-content[data-active-panel="generate"] .purchase-info-card .order-fields label:nth-child(-n + 3) input {
  color: var(--kit-text);
  background: transparent;
  border: 0;
  font-weight: 600;
}

.purchase-content[data-active-panel="generate"] .purchase-info-card .order-summary {
  border-top: 1px solid var(--kit-border);
}

.purchase-content[data-active-panel="generate"] .purchase-info-card .order-summary strong {
  color: var(--kit-text);
}

.purchase-content[data-active-panel="generate"] .purchase-success-card {
  width: min(960px, 100%);
  height: 520px;
  min-height: 520px;
  max-height: 520px;
  padding: 0;
}

.purchase-content[data-active-panel="generate"] .purchase-success-panel {
  background: #fff;
  border: 1px solid var(--kit-border);
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

.purchase-content[data-active-panel="generate"] .success-check {
  display: grid;
  place-items: center;
  padding: 22px;
  background: var(--kit-primary);
}

.purchase-content[data-active-panel="generate"] .success-check .lucide-icon,
.purchase-content[data-active-panel="generate"] .success-check svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 1280px) {
  .purchase-kpi-grid,
  .purchase-manage-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .purchase-board-grid,
  .purchase-manage-layout,
  .purchase-grid {
    grid-template-columns: 1fr;
  }

  .purchase-grid {
    height: auto;
    overflow: visible;
  }

  .purchase-manage-layout,
  .manage-table-card {
    min-height: 0;
  }

  .purchase-manage-layout {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .manage-table-card {
    height: 460px;
  }

  .purchase-products-card,
  .purchase-cart-card,
  .purchase-info-card {
    height: auto;
    max-height: none;
    min-height: 420px;
  }
}

@media (max-width: 900px) {
  .purchase-content {
    padding: 18px 16px 44px;
  }

  .purchase-section-head,
  .content-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .actions,
  .manage-toolbar,
  .generate-steps {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .purchase-kpi-grid,
  .purchase-manage-stats {
    grid-template-columns: 1fr;
  }

  .pay-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-form {
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .order-detail-actions {
    grid-template-columns: 1fr;
  }

  .buyer-rank-row {
    grid-template-columns: 28px minmax(68px, 1fr);
  }

  .buyer-rank-row i,
  .buyer-rank-row strong {
    grid-column: 2;
  }
}
