:root {
  --ahpr-purple: #9b4dff;
  --ahpr-purple-deep: #6f22db;
  --ahpr-purple-light: #c58aff;
  --ahpr-bg: #07070a;
  --ahpr-panel: rgba(13, 10, 20, 0.94);
  --ahpr-panel-soft: rgba(255, 255, 255, 0.045);
  --ahpr-line: rgba(255, 255, 255, 0.12);
  --ahpr-text: #fff;
  --ahpr-muted: rgba(255, 255, 255, 0.7);
  --ahpr-faint: rgba(255, 255, 255, 0.5);
}

.ahpr-checkout-panel,
.ahpr-account,
.ahpr-dashboard-summary,
.ahpr-order-rewards,
.ahpr-checkout-panel *,
.ahpr-account *,
.ahpr-dashboard-summary *,
.ahpr-order-rewards * {
  box-sizing: border-box;
}

.ahpr-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border: 1px solid rgba(197, 138, 255, 0.35);
  border-radius: 999px;
  color: var(--ahpr-purple-light);
  background: rgba(155, 77, 255, 0.1);
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ahpr-checkout-panel {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 18px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid rgba(155, 77, 255, 0.32);
  border-radius: 20px;
  color: var(--ahpr-text);
  background:
    radial-gradient(360px 180px at 100% 0%, rgba(155, 77, 255, 0.22), transparent 72%),
    linear-gradient(135deg, rgba(13, 10, 20, 0.98), rgba(6, 6, 9, 0.98));
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.3);
}

.ahpr-checkout-panel::after {
  content: "";
  position: absolute;
  right: -55px;
  bottom: -85px;
  width: 180px;
  height: 180px;
  border: 28px solid rgba(155, 77, 255, 0.075);
  border-radius: 50%;
  pointer-events: none;
}

.ahpr-checkout-panel__icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(197, 138, 255, 0.4);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--ahpr-purple), var(--ahpr-purple-deep));
  box-shadow: 0 0 24px rgba(155, 77, 255, 0.35);
  font-size: 20px;
}

.ahpr-checkout-panel__body {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.ahpr-checkout-panel h3 {
  margin: 8px 0 7px !important;
  color: #fff !important;
  font-size: clamp(20px, 2vw, 27px) !important;
  line-height: 1.1 !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

.ahpr-checkout-panel p {
  margin: 0;
  color: var(--ahpr-muted);
  font-size: 14px;
  line-height: 1.55;
}

.ahpr-checkout-balance strong {
  color: #fff;
}

.ahpr-redeem-controls {
  margin-top: 15px;
}

.ahpr-redeem-controls > label {
  display: block;
  margin-bottom: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.ahpr-redeem-controls__row {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) auto auto;
  gap: 9px;
}

.ahpr-redeem-controls input[type="number"] {
  width: 100% !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 13px !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 13px !important;
  outline: none !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.055) !important;
  box-shadow: none !important;
}

.ahpr-redeem-controls input[type="number"]:focus {
  border-color: rgba(197, 138, 255, 0.8) !important;
  box-shadow: 0 0 0 3px rgba(155, 77, 255, 0.14) !important;
}

.ahpr-checkout-panel .button.ahpr-button-primary,
.ahpr-checkout-panel .button.ahpr-button-secondary {
  min-height: 44px !important;
  margin: 0 !important;
  padding: 10px 15px !important;
  border-radius: 13px !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 900 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.ahpr-checkout-panel .button.ahpr-button-primary {
  border: 1px solid rgba(197, 138, 255, 0.6) !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--ahpr-purple), var(--ahpr-purple-deep)) !important;
  box-shadow: 0 8px 22px rgba(111, 34, 219, 0.28) !important;
}

.ahpr-checkout-panel .button.ahpr-button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.13) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

.ahpr-remove-link {
  display: inline-block;
  margin: 9px 0 0;
  padding: 0;
  border: 0;
  color: var(--ahpr-purple-light);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.ahpr-remove-link[hidden] {
  display: none !important;
}

.ahpr-checkout-hint {
  margin-top: 9px !important;
  color: var(--ahpr-faint) !important;
  font-size: 12px !important;
}

.ahpr-checkout-message {
  min-height: 18px;
  margin-top: 7px;
  color: var(--ahpr-purple-light);
  font-size: 12px;
  font-weight: 750;
}

.ahpr-checkout-message.is-error {
  color: #ff9da8;
}

.ahpr-checkout-earning-row {
  background:
    radial-gradient(220px 90px at 100% 50%, rgba(155, 77, 255, 0.18), transparent 72%),
    linear-gradient(135deg, rgba(155, 77, 255, 0.11), rgba(255, 255, 255, 0.035)) !important;
}

.ahpr-checkout-earning-row th,
.ahpr-checkout-earning-row td {
  border-color: rgba(197, 138, 255, 0.32) !important;
}

.ahpr-checkout-earning-row__label {
  color: var(--ahpr-purple-light);
  font-weight: 900;
}

.ahpr-checkout-earning-row__points {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid rgba(197, 138, 255, 0.36);
  border-radius: 999px;
  color: #fff;
  background: rgba(155, 77, 255, 0.14);
  font-size: 13px;
  line-height: 1;
  font-weight: 950;
  white-space: nowrap;
}

.ahpr-checkout-earning-row td small {
  display: block;
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  line-height: 1.4;
  font-weight: 600;
}

.ahpr-cart-estimate td small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  line-height: 1.4;
}

.ahpr-account {
  color: var(--ahpr-text);
}

.ahpr-account__heading {
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--ahpr-line);
  border-radius: 18px;
  background:
    radial-gradient(320px 150px at 100% 0%, rgba(155, 77, 255, 0.18), transparent 70%),
    rgba(255, 255, 255, 0.025);
}

.ahpr-account__heading h2,
.ahpr-history__heading h3,
.ahpr-order-rewards h2 {
  margin: 8px 0 6px !important;
  color: #fff !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
}

.ahpr-account__heading p {
  margin: 0;
  color: var(--ahpr-muted);
}

.ahpr-balance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ahpr-balance-card {
  position: relative;
  min-width: 0;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--ahpr-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.ahpr-balance-card::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -60px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(155, 77, 255, 0.09);
  filter: blur(2px);
}

.ahpr-balance-card > * {
  position: relative;
  z-index: 1;
}

.ahpr-balance-card > span {
  display: block;
  color: var(--ahpr-muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ahpr-balance-card > strong {
  display: block;
  margin: 8px 0 3px;
  color: #fff;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.ahpr-balance-card > em {
  display: block;
  color: var(--ahpr-purple-light);
  font-style: normal;
  font-size: 13px;
  font-weight: 800;
}

.ahpr-balance-card > small {
  display: block;
  margin-top: 8px;
  color: var(--ahpr-faint);
  line-height: 1.4;
}

.ahpr-account-alert {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 157, 168, 0.3);
  border-radius: 15px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 82, 104, 0.08);
  line-height: 1.5;
}

.ahpr-account-alert strong {
  color: #ffbdc5;
}

.ahpr-history {
  padding: 18px;
  border: 1px solid var(--ahpr-line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
}

.ahpr-history__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.ahpr-history__heading > span {
  color: var(--ahpr-faint);
  font-size: 11px;
}

.ahpr-table-wrap {
  overflow-x: auto;
}

.ahpr-table {
  width: 100%;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 7px !important;
  border: 0 !important;
}

.ahpr-table th {
  padding: 7px 10px !important;
  border: 0 !important;
  color: var(--ahpr-faint) !important;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ahpr-table td {
  padding: 12px 10px !important;
  border-top: 1px solid var(--ahpr-line) !important;
  border-bottom: 1px solid var(--ahpr-line) !important;
  color: rgba(255, 255, 255, 0.78) !important;
  background: rgba(255, 255, 255, 0.035) !important;
  font-size: 12px;
}

.ahpr-table td:first-child {
  border-left: 1px solid var(--ahpr-line) !important;
  border-radius: 12px 0 0 12px;
}

.ahpr-table td:last-child {
  border-right: 1px solid var(--ahpr-line) !important;
  border-radius: 0 12px 12px 0;
}

.ahpr-table td strong,
.ahpr-table td a {
  color: #fff !important;
}

.ahpr-table td small {
  display: block;
  margin-top: 3px;
  color: var(--ahpr-faint);
  line-height: 1.35;
}

.ahpr-points {
  text-align: right;
  font-weight: 900;
}

.ahpr-points.is-positive {
  color: #bbffcf !important;
}

.ahpr-points.is-negative {
  color: #ffb2bd !important;
}

.ahpr-status {
  display: inline-flex;
  padding: 5px 8px;
  border: 1px solid rgba(197, 138, 255, 0.25);
  border-radius: 999px;
  color: var(--ahpr-purple-light);
  background: rgba(155, 77, 255, 0.08);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ahpr-dashboard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(155, 77, 255, 0.3);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(155, 77, 255, 0.13), rgba(255, 255, 255, 0.035));
}

.ahpr-dashboard-summary > div {
  display: grid;
  gap: 4px;
}

.ahpr-dashboard-summary strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.ahpr-dashboard-summary small {
  color: var(--ahpr-muted);
}

.ahpr-dashboard-summary .button {
  border: 1px solid rgba(197, 138, 255, 0.55) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: linear-gradient(135deg, var(--ahpr-purple), var(--ahpr-purple-deep)) !important;
  font-weight: 850 !important;
}

.ahpr-order-rewards {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--ahpr-line);
  border-radius: 18px;
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
}

.ahpr-order-rewards__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ahpr-order-rewards__grid > div {
  padding: 14px;
  border: 1px solid var(--ahpr-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.ahpr-order-rewards__grid span,
.ahpr-order-rewards__grid small {
  display: block;
  color: var(--ahpr-muted);
}

.ahpr-order-rewards__grid strong {
  display: block;
  margin: 5px 0;
  color: #fff;
  font-size: 20px;
}

.ahpr-empty {
  padding: 24px;
  border: 1px dashed rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  color: var(--ahpr-muted);
  text-align: center;
}

@media (max-width: 820px) {
  .ahpr-redeem-controls__row {
    grid-template-columns: 1fr 1fr;
  }

  .ahpr-redeem-controls__row input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .ahpr-checkout-panel {
    grid-template-columns: 1fr;
  }

  .ahpr-checkout-panel__icon {
    width: 42px;
    height: 42px;
  }

  .ahpr-balance-grid,
  .ahpr-order-rewards__grid {
    grid-template-columns: 1fr;
  }

  .ahpr-history__heading,
  .ahpr-dashboard-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .ahpr-dashboard-summary .button {
    width: 100%;
    text-align: center;
  }

  .ahpr-table,
  .ahpr-table tbody,
  .ahpr-table tr,
  .ahpr-table td {
    display: block;
    width: 100%;
  }

  .ahpr-table thead {
    display: none;
  }

  .ahpr-table tr {
    margin-bottom: 10px;
    overflow: hidden;
    border: 1px solid var(--ahpr-line);
    border-radius: 14px;
  }

  .ahpr-table td,
  .ahpr-table td:first-child,
  .ahpr-table td:last-child {
    display: grid;
    grid-template-columns: minmax(100px, 0.45fr) minmax(0, 1fr);
    gap: 10px;
    border: 0 !important;
    border-bottom: 1px solid var(--ahpr-line) !important;
    border-radius: 0;
  }

  .ahpr-table td:last-child {
    border-bottom: 0 !important;
  }

  .ahpr-table td::before {
    content: attr(data-title);
    color: var(--ahpr-faint);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .ahpr-points {
    text-align: left;
  }
}

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

  .ahpr-redeem-controls__row input {
    grid-column: auto;
  }

  .ahpr-checkout-panel .button.ahpr-button-primary,
  .ahpr-checkout-panel .button.ahpr-button-secondary {
    width: 100% !important;
  }
}
