.aa-rewards-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 9000;
  border: 1px solid #c6a77d;
  border-radius: 999px;
  background: #482719;
  color: #fffaf2;
  padding: 13px 22px;
  font: 600 14px/1.2 system-ui, sans-serif;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 8px 28px #24160f30;
}

.aa-rewards-launcher:hover {
  background: #69402c;
  transform: translateY(-2px);
}

.aa-rewards-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 18px;
  background: #21170dcc;
  backdrop-filter: blur(5px);
}

.aa-rewards-backdrop[hidden],
.aa-rewards-content [hidden] {
  display: none !important;
}

.aa-rewards-panel {
  width: min(100%, 460px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  border: 1px solid #d8c6aa;
  border-radius: 22px;
  background: #f8f3ea;
  color: #38251b;
  box-shadow: 0 25px 90px #0005;
}

.aa-rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 27px 19px;
  border-bottom: 1px solid #e5d9c8;
}

.aa-rewards-eyebrow {
  margin: 0 0 5px;
  color: #98734e;
  font: 600 10px/1.4 system-ui, sans-serif;
  letter-spacing: .2em;
}

.aa-rewards-header h2 {
  margin: 0;
  font: 600 32px/1.1 Georgia, serif;
}

.aa-rewards-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #eee5d8;
  color: #482719;
  font-size: 26px;
  cursor: pointer;
}

.aa-rewards-content {
  padding: 25px 27px 29px;
}

.aa-rewards-description {
  margin: 0 0 22px;
  color: #77685c;
  font: 14px/1.6 system-ui, sans-serif;
}

.aa-rewards-content form {
  display: grid;
  gap: 16px;
}

.aa-rewards-content label {
  display: grid;
  gap: 7px;
  color: #604735;
  font: 600 12px/1.4 system-ui, sans-serif;
}

.aa-rewards-content input {
  box-sizing: border-box;
  width: 100%;
  min-height: 47px;
  border: 1px solid #ded0bc;
  border-radius: 10px;
  outline: none;
  background: #fffdf9;
  color: #38251b;
  padding: 0 13px;
  font: 14px system-ui, sans-serif;
}

.aa-rewards-content input:focus {
  border-color: #98734e;
  box-shadow: 0 0 0 3px #98734e20;
}

.aa-rewards-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 5px;
  border: 0;
  border-radius: 10px;
  background: #482719;
  color: #fffaf2;
  font: 600 14px system-ui, sans-serif;
  cursor: pointer;
}

.aa-rewards-submit:disabled {
  opacity: .6;
  cursor: wait;
}

.aa-rewards-switch {
  margin: 19px 0 0;
  color: #77685c;
  text-align: center;
  font: 13px system-ui, sans-serif;
}

.aa-rewards-switch button {
  border: 0;
  background: none;
  color: #875e38;
  font-weight: 700;
  cursor: pointer;
}

.aa-rewards-hint,
.aa-rewards-email {
  color: #83766b;
  font: 12px system-ui, sans-serif;
}

.aa-rewards-membership {
  display: grid;
  gap: 7px;
  margin: 22px 0;
  border: 1px solid #e3d4c0;
  border-radius: 12px;
  background: #fffaf2;
  padding: 16px;
  font: 12px system-ui, sans-serif;
}

.aa-rewards-membership strong {
  color: #482719;
  font: 600 18px Georgia, serif;
  overflow-wrap: anywhere;
}

.aa-rewards-name {
  margin: 12px 0 4px;
  font: 600 25px Georgia, serif;
}

.aa-rewards-message {
  margin: 18px 0 0;
  padding: 12px;
  border-radius: 9px;
  background: #e8efe4;
  color: #31522e;
  font: 13px/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-rewards-message.is-error {
  background: #f4e6df;
  color: #8a352b;
}

body.aa-rewards-open {
  overflow: hidden;
}

@media (max-width: 520px) {
  .aa-rewards-launcher {
    right: 14px;
    bottom: 14px;
    padding: 12px 18px;
  }

  .aa-rewards-content,
  .aa-rewards-header {
    padding-left: 21px;
    padding-right: 21px;
  }

  .aa-rewards-panel {
    border-radius: 17px;
  }
}

/* Customer dashboard */
.aa-dashboard-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.aa-role-chip {
  border: 1px solid #d9c6a9;
  border-radius: 30px;
  padding: 6px 10px;
  color: #765b3f;
  font: 600 9px system-ui, sans-serif;
  letter-spacing: .1em;
}

.aa-dashboard-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 17px 0 22px;
}

.aa-dashboard-stat {
  display: grid;
  gap: 8px;
  border: 1px solid #e3d4c0;
  border-radius: 12px;
  background: #fffaf2;
  padding: 15px;
}

.aa-dashboard-stat span {
  color: #83766a;
  font: 11px system-ui, sans-serif;
}

.aa-dashboard-stat strong {
  color: #482719;
  font: 600 26px Georgia, serif;
}

.aa-dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 5px;
  margin-bottom: 19px;
  border-radius: 12px;
  background: #eee6da;
}

.aa-dashboard-tabs button {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #786758;
  padding: 10px 3px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-dashboard-tabs button.is-active {
  background: #fffaf2;
  color: #482719;
  box-shadow: 0 2px 6px #48271912;
}

.aa-dashboard-qr {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0 18px;
  border: 1px solid #e3d4c0;
  border-radius: 13px;
  background: #fffaf2;
  padding: 15px;
}

.aa-qr-placeholder {
  flex: 0 0 65px;
  height: 65px;
  display: grid;
  place-items: center;
  border: 1px dashed #b89b76;
  border-radius: 8px;
  color: #98734e;
  font: 600 18px Georgia, serif;
}

.aa-dashboard-qr h4,
.aa-dashboard-heading {
  margin: 0 0 7px;
  color: #482719;
  font: 600 18px Georgia, serif;
}

.aa-dashboard-qr p,
.aa-dashboard-empty {
  margin: 0;
  color: #83766a;
  font: 12px/1.6 system-ui, sans-serif;
}

.aa-dashboard-empty {
  margin: 12px 0 20px;
  border-radius: 10px;
  background: #fffaf2;
  padding: 16px;
}

.aa-dashboard-tabs button:focus-visible,
.aa-rewards-submit:focus-visible,
.aa-rewards-close:focus-visible {
  outline: 3px solid #b18a5d;
  outline-offset: 3px;
}



/* Staff and administrator workspaces */
.aa-staff-section {
  display: grid;
  gap: 13px;
  margin: 20px 0;
  padding: 17px;
  border: 1px solid #e3d4c0;
  border-radius: 13px;
  background: #fffaf2;
}

.aa-staff-section h4 {
  margin: 0;
  color: #482719;
  font: 600 19px Georgia, serif;
}

.aa-staff-section select,
.aa-staff-section input {
  box-sizing: border-box;
  width: 100%;
  min-height: 45px;
  border: 1px solid #ded0bc;
  border-radius: 9px;
  background: #fffdf9;
  color: #38251b;
  padding: 0 11px;
  font: 13px system-ui, sans-serif;
}

.aa-staff-note {
  margin: 0;
  color: #887969;
  font: 12px/1.6 system-ui, sans-serif;
}

.aa-staff-secondary {
  min-height: 42px;
  border: 1px solid #98734e;
  border-radius: 9px;
  background: transparent;
  color: #68482f;
  font: 600 13px system-ui, sans-serif;
  cursor: pointer;
}

.aa-staff-cart {
  display: grid;
  gap: 9px;
  color: #796959;
  font: 12px/1.5 system-ui, sans-serif;
}

.aa-staff-cart-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid #eadfce;
}

.aa-staff-cart-row strong {
  color: #482719;
  white-space: nowrap;
}

.aa-staff-cart-row button {
  border: 0;
  background: transparent;
  color: #985342;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-staff-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #d8c6aa;
  padding-top: 12px;
  color: #765b3f;
  font: 12px system-ui, sans-serif;
}

.aa-staff-total strong {
  color: #482719;
  font: 600 19px Georgia, serif;
}

.aa-staff-result {
  margin: 15px 0;
  border: 1px solid #c7d7bd;
  border-radius: 10px;
  background: #edf3e9;
  color: #31522e;
  padding: 13px;
  font: 12px/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
  margin: 22px 0;
}

.aa-admin-grid > div {
  display: grid;
  gap: 7px;
  min-height: 74px;
  align-content: center;
  border: 1px solid #e3d4c0;
  border-radius: 11px;
  background: #fffaf2;
  padding: 13px;
}

.aa-admin-grid strong {
  color: #482719;
  font: 600 16px Georgia, serif;
}

.aa-admin-grid span {
  color: #887969;
  font: 11px/1.4 system-ui, sans-serif;
}



/* Membership QR display */
.aa-membership-qr {
  flex: 0 0 176px;
  min-width: 176px;
  min-height: 176px;
  display: grid;
  place-items: center;
  border: 1px solid #e5d9c8;
  border-radius: 10px;
  background: #fff;
  padding: 7px;
  box-sizing: border-box;
}

.aa-membership-qr-code {
  width: 160px;
  height: 160px;
  display: grid;
  place-items: center;
}

.aa-membership-qr-code canvas,
.aa-membership-qr-code img {
  display: block;
  max-width: 100%;
  height: auto;
}

.aa-membership-details {
  min-width: 0;
}

.aa-qr-download {
  margin-top: 12px;
  border: 1px solid #98734e;
  border-radius: 8px;
  background: transparent;
  color: #68482f;
  padding: 9px 12px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-qr-download[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .aa-dashboard-qr {
    flex-direction: column;
    align-items: flex-start;
  }

  .aa-membership-qr {
    align-self: center;
  }
}



/* Staff membership QR scanner */
.aa-staff-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.aa-staff-qr-actions button {
  min-height: 43px;
  border: 1px solid #765037;
  border-radius: 9px;
  background: #482719;
  color: #fffaf2;
  padding: 8px;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
}

.aa-staff-qr-actions button[hidden],
[data-staff-qr-video][hidden] {
  display: none;
}

[data-staff-qr-video] {
  width: 100%;
  max-height: 250px;
  border-radius: 10px;
  background: #241b15;
  object-fit: cover;
}

.aa-staff-qr-status {
  margin: 0;
  color: #83766a;
  font: 12px/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-staff-qr-status.is-error {
  color: #963e32;
}

.aa-staff-qr-status.is-success {
  color: #315c35;
}


.aa-preview-banner {
  margin: 0 0 16px;
  border: 1px solid #d8b77b;
  border-radius: 9px;
  background: #f5ead5;
  color: #765329;
  padding: 11px;
  font: 600 11px/1.5 system-ui, sans-serif;
}


/* Admin management preview */
.aa-admin-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 5px;
  margin: 20px 0;
  border-radius: 11px;
  background: #eee6da;
}

.aa-admin-tabs button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #786758;
  padding: 10px 13px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-admin-tabs button.is-active {
  background: #fffaf2;
  color: #482719;
}

.aa-admin-workspace [hidden] {
  display: none !important;
}

.aa-admin-readonly {
  display: inline-block;
  border: 1px solid #dfcba9;
  border-radius: 20px;
  background: #f7eddd;
  color: #80613d;
  padding: 6px 10px;
  font: 600 9px system-ui, sans-serif;
  letter-spacing: .1em;
}

.aa-admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 17px 0;
}

.aa-admin-stats article {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e3d4c0;
  border-radius: 11px;
  background: #fffaf2;
}

.aa-admin-stats article span {
  color: #83766a;
  font: 11px system-ui, sans-serif;
}

.aa-admin-stats article strong {
  color: #482719;
  font: 600 19px Georgia, serif;
  overflow-wrap: anywhere;
}

.aa-admin-product-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.aa-admin-product-heading h4,
.aa-admin-workspace section > h4 {
  margin: 0 0 5px;
  color: #482719;
  font: 600 20px Georgia, serif;
}

.aa-admin-product-heading p {
  margin: 0;
  color: #83766a;
  font: 12px system-ui, sans-serif;
}

.aa-admin-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 15px 0;
}

.aa-admin-filters input,
.aa-admin-filters select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 43px;
  border: 1px solid #ded0bc;
  border-radius: 9px;
  background: #fffdf9;
  color: #38251b;
  padding: 0 10px;
  font: 12px system-ui, sans-serif;
}

.aa-admin-result-count {
  color: #83766a;
  font: 11px system-ui, sans-serif;
}

.aa-admin-table-wrap {
  max-height: 390px;
  overflow: auto;
  border: 1px solid #e3d4c0;
  border-radius: 10px;
  background: #fffaf2;
}

.aa-admin-products {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font: 11px/1.5 system-ui, sans-serif;
}

.aa-admin-products th {
  position: sticky;
  top: 0;
  background: #eee5d8;
  color: #604735;
  font-weight: 700;
}

.aa-admin-products th,
.aa-admin-products td {
  padding: 10px 9px;
  border-bottom: 1px solid #eee4d6;
}

.aa-admin-products td {
  color: #655548;
}

.aa-admin-products .aa-admin-price {
  white-space: nowrap;
  color: #482719;
  font-weight: 700;
}

@media (max-width: 420px) {
  .aa-admin-stats {
    grid-template-columns: 1fr 1fr;
  }

  .aa-admin-filters {
    grid-template-columns: 1fr;
  }
}



/* Staff searchable product catalogue */
.aa-staff-product-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.aa-staff-product-filters label {
  min-width: 0;
}

.aa-staff-product-filters input,
.aa-staff-product-filters select {
  width: 100%;
  box-sizing: border-box;
}

.aa-staff-product-count {
  margin: -4px 0 0;
  color: #887969;
  font: 11px system-ui, sans-serif;
}

@media (max-width: 400px) {
  .aa-staff-product-filters {
    grid-template-columns: 1fr;
  }
}



/* Editable staff cart quantities */
.aa-staff-cart-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
}

.aa-staff-cart-row > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.aa-staff-quantity {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #e3d4c0;
  border-radius: 8px;
  padding: 3px;
}

.aa-staff-quantity button {
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 6px;
  background: #eee5d8;
  color: #482719;
  font-size: 16px;
  cursor: pointer;
}

.aa-staff-quantity span {
  min-width: 16px;
  color: #482719;
  text-align: center;
  font: 600 12px system-ui, sans-serif;
}

@media (max-width: 430px) {
  .aa-staff-cart-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .aa-staff-quantity {
    grid-column: 1;
    grid-row: 2;
    width: max-content;
  }

  .aa-staff-cart-row > button[data-action="remove-staff-item"] {
    grid-column: 2;
    grid-row: 2;
  }
}



/* Staff purchase review */
.aa-staff-review {
  margin-top: 17px;
  padding: 17px;
  border: 1px solid #cbb28f;
  border-radius: 12px;
  background: #f8f0e3;
}

.aa-staff-review[hidden] {
  display: none !important;
}

.aa-staff-review h4 {
  margin: 0 0 12px;
  color: #482719;
  font: 600 19px Georgia, serif;
}

.aa-staff-review > p {
  color: #705c49;
  font: 12px/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-staff-review-items {
  display: grid;
  gap: 9px;
  margin: 14px 0;
  border-top: 1px solid #e2d2bb;
  border-bottom: 1px solid #e2d2bb;
  padding: 13px 0;
}

.aa-staff-review-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #695543;
  font: 12px/1.5 system-ui, sans-serif;
}

.aa-staff-review-line strong {
  color: #482719;
  white-space: nowrap;
}

.aa-staff-review .aa-staff-review-total {
  color: #482719;
  font: 600 18px Georgia, serif;
}

.aa-staff-review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}

.aa-staff-review-actions button {
  min-height: 44px;
  border: 1px solid #765037;
  border-radius: 9px;
  background: #482719;
  color: #fffaf2;
  padding: 9px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-staff-review-actions button:first-child {
  background: transparent;
  color: #482719;
}



/* Staff purchase history */
.aa-staff-history-count {
  color: #765b3f;
  font: 600 12px system-ui, sans-serif;
}

.aa-staff-history-list {
  display: grid;
  gap: 10px;
}

.aa-staff-history-empty {
  margin: 0;
  border: 1px dashed #ddcbb3;
  border-radius: 9px;
  padding: 15px;
  color: #83766a;
  font: 12px/1.5 system-ui, sans-serif;
}

.aa-staff-history-card {
  display: grid;
  gap: 7px;
  border: 1px solid #e3d4c0;
  border-radius: 10px;
  background: #fffaf2;
  padding: 13px;
}

.aa-staff-history-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.aa-staff-history-heading strong {
  color: #482719;
  font: 600 15px Georgia, serif;
}

.aa-staff-history-status {
  border-radius: 20px;
  background: #eee5d8;
  color: #765b3f;
  padding: 5px 8px;
  font: 700 9px system-ui, sans-serif;
}

.aa-staff-history-status.is-draft {
  background: #f3e8d5;
  color: #8a5a20;
}

.aa-staff-history-status.is-paid {
  background: #e2edf8;
  color: #285b8e;
}

.aa-staff-history-status.is-claimed {
  background: #e1efe2;
  color: #326b3a;
}

.aa-staff-history-status.is-unknown {
  background: #eee5e5;
  color: #795050;
}

.aa-admin-purchase-claimed {
  color: #326b3a !important;
}

.aa-staff-history-card p {
  margin: 0;
  color: #77685c;
  font: 11px/1.5 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-staff-history-card small {
  color: #9a8975;
  font: 10px system-ui, sans-serif;
}


/* Staff workspace navigation */
.aa-staff-tabs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  margin: 19px 0;
  padding: 5px;
  border-radius: 11px;
  background: #eee6da;
  scrollbar-width: thin;
}

.aa-staff-tabs button {
  flex: 1 0 auto;
  min-height: 39px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #786758;
  padding: 8px 12px;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-staff-tabs button.is-active {
  background: #fffaf2;
  color: #482719;
  box-shadow: 0 2px 6px #48271912;
}

.aa-staff-tabs button:focus-visible {
  outline: 2px solid #98734e;
  outline-offset: 2px;
}

.aa-staff-panel[hidden],
[data-staff-panel][hidden] {
  display: none !important;
}


.aa-staff-verified-customer {
  margin: 14px 0;
  padding: 15px;
  border: 1px solid rgba(53, 125, 85, .35);
  border-radius: 12px;
  background: rgba(53, 125, 85, .08);
}

.aa-staff-verified-customer > strong {
  display: block;
  margin-bottom: 10px;
}

.aa-staff-verified-customer p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 7px 0;
  font-size: 13px;
}

.aa-staff-verified-customer p strong {
  overflow-wrap: anywhere;
  text-align: right;
}

/* Verified customer details inside staff purchase review */
.aa-staff-review-customer {
  display: grid;
  gap: 6px;
  margin: 12px 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(120, 150, 120, 0.3);
  border-radius: 12px;
  background: rgba(120, 150, 120, 0.08);
}

.aa-staff-review-customer strong {
  font-size: 1rem;
}

.aa-staff-review-customer p {
  margin: 0;
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}

/* Phase E — Customer Purchase History */

.aa-history-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.aa-history-card {
  padding: 18px;
  border: 1px solid rgba(91, 65, 45, 0.16);
  border-radius: 16px;
  background: #fffdf9;
  box-shadow: 0 5px 18px rgba(45, 32, 22, 0.045);
}

.aa-history-card h5 {
  margin: 0 0 8px;
  color: #493326;
  font-size: 16px;
  font-weight: 700;
}

.aa-history-card p {
  margin: 7px 0;
  color: #716255;
  font-size: 13px;
  line-height: 1.5;
}

.aa-history-card p:nth-of-type(3) {
  color: #493326;
  font-weight: 700;
}

.aa-history-card strong {
  display: block;
  margin-top: 16px;
  color: #493326;
  font-size: 13px;
}

.aa-history-card ul {
  display: grid;
  gap: 8px;
  margin: 9px 0 0;
  padding: 0 0 0 18px;
  color: #716255;
  font-size: 13px;
  line-height: 1.6;
}

.aa-history-card li {
  padding-left: 3px;
}

.aa-history-card li::marker {
  color: #a4774f;
}

[data-purchase-history] > .aa-dashboard-empty {
  padding: 22px 16px;
  border: 1px dashed rgba(91, 65, 45, 0.22);
  border-radius: 14px;
  color: #817366;
  text-align: center;
  line-height: 1.6;
}

@media (max-width: 520px) {
  .aa-history-card {
    padding: 15px;
    border-radius: 13px;
  }

  .aa-history-card h5 {
    font-size: 15px;
  }

  .aa-history-card p,
  .aa-history-card ul {
    font-size: 12px;
  }
}


/* Phase E — Points Activity */

.aa-points-history-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.aa-points-history-card {
  padding: 16px 18px;
  border: 1px solid rgba(91, 65, 45, 0.15);
  border-radius: 15px;
  background: #fffdf9;
  box-shadow: 0 4px 15px rgba(45, 32, 22, 0.04);
}

.aa-points-history-card h5 {
  margin: 0 0 10px;
  color: #493326;
  font-size: 15px;
  font-weight: 700;
  text-transform: capitalize;
}

.aa-points-history-card p {
  margin: 7px 0 0;
  color: #817366;
  font-size: 13px;
  line-height: 1.5;
}

.aa-points-history-card strong {
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
}

.aa-points-history-card .aa-points-positive {
  color: #27804d;
}

.aa-points-history-card .aa-points-negative {
  color: #a34b43;
}

@media (max-width: 520px) {
  .aa-points-history-card {
    padding: 14px;
  }
}

/* Staff reward redemption history */
.aa-staff-history-reward {
  display: grid;
  gap: 6px;
  margin-top: 5px;
  padding: 12px;
  border: 1px solid #d9bd8b;
  border-left: 3px solid #b58a4b;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff8e9, #f8eedc);
}

.aa-staff-history-reward strong {
  color: #68431f;
  font: 700 13px Georgia, serif;
  letter-spacing: 0.2px;
}

.aa-staff-history-reward p {
  margin: 0;
  color: #725a3d;
  font: 11px/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}

.aa-staff-history-reward p:nth-of-type(3),
.aa-staff-history-reward p:nth-of-type(4) {
  color: #397044;
  font-weight: 700;
}

/* Unified Admin Operations workspace */
.aa-admin-workspace [data-admin-operations] {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.aa-admin-workspace [data-admin-operations] > .aa-staff-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  margin: 0 0 8px;
  border: 1px solid #e3d4c0;
  box-shadow: 0 3px 12px rgba(72, 39, 25, .06);
}

.aa-admin-workspace [data-admin-operations] > .aa-staff-section {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.aa-admin-workspace [data-admin-operations] > .aa-staff-result {
  margin: 0;
}

.aa-admin-workspace [data-admin-panel="customer-purchase"] > h4 {
  margin: 0 0 6px;
  color: #482719;
  font: 600 22px Georgia, serif;
}

.aa-admin-workspace [data-admin-panel="customer-purchase"] > .aa-dashboard-empty {
  margin: 0 0 14px;
}

@media (max-width: 560px) {
  .aa-admin-workspace [data-admin-operations] > .aa-staff-tabs {
    position: static;
  }

  .aa-admin-workspace [data-admin-operations] > .aa-staff-section {
    padding: 13px;
  }
}
/* AA KAYFAK PROFESSIONAL ADMIN LAYOUT */
.aa-rewards-backdrop:has(.aa-admin-workspace) {
  padding: 20px;
  align-items: center;
}

.aa-rewards-panel:has(.aa-admin-workspace) {
  width: min(1200px, calc(100vw - 40px));
  max-height: calc(100dvh - 40px);
  border-radius: 18px;
  overflow-y: auto;
  background: #f7f5f0;
  border: 1px solid #ded6c9;
  box-shadow: 0 28px 90px #17110b45;
}

.aa-rewards-panel:has(.aa-admin-workspace) .aa-rewards-header {
  padding: 20px 30px;
  background: #fffdf9;
  border-bottom: 1px solid #e9e2d8;
}

.aa-rewards-panel:has(.aa-admin-workspace) .aa-rewards-content {
  padding: 25px 30px 32px;
}

.aa-rewards-panel:has(.aa-admin-workspace) .aa-dashboard-top {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5ded3;
}

.aa-admin-workspace {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  align-items: start;
  gap: 25px;
  min-width: 0;
}

.aa-admin-tabs {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 9px;
  border: 1px solid #e8e0d4;
  border-radius: 13px;
  background: #eeeae2;
}

.aa-admin-tabs button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
  font: 600 12px/1.3 system-ui, sans-serif;
  transition: background .18s ease, color .18s ease;
}

.aa-admin-tabs button:hover {
  background: #f8f5ef;
  color: #482719;
}

.aa-admin-tabs button.is-active {
  background: #482719;
  color: #fffaf2;
  box-shadow: 0 3px 9px #48271920;
}

.aa-admin-workspace > section[data-admin-panel] {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  padding: 3px 0;
  animation: aa-admin-panel-in .2s ease both;
}

@keyframes aa-admin-panel-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.aa-admin-stats {
  gap: 13px;
  margin: 20px 0;
}

.aa-admin-stats article {
  min-height: 100px;
  align-content: space-between;
  padding: 17px;
  border-color: #e6dfd4;
  border-radius: 13px;
  background: #fffdf9;
  box-shadow: 0 3px 12px #38251b08;
}

.aa-admin-stats article span {
  font-size: 11px;
  letter-spacing: .02em;
}

.aa-admin-stats article strong {
  font: 600 25px Georgia, serif;
}

.aa-admin-workspace [data-admin-panel] > h4,
.aa-admin-product-heading h4 {
  font-size: 21px;
  letter-spacing: -.02em;
}

.aa-admin-filters {
  gap: 10px;
}

.aa-admin-filters input,
.aa-admin-filters select {
  min-height: 44px;
  border-color: #ded7cc;
  border-radius: 9px;
  background: #fffdf9;
  font-size: 12px;
}

.aa-admin-filters input:focus,
.aa-admin-filters select:focus {
  outline: none;
  border-color: #98734e;
  box-shadow: 0 0 0 3px #98734e20;
}

.aa-admin-table-wrap,
.aa-admin-purchase-list {
  border: 1px solid #e6dfd4;
  border-radius: 12px;
  background: #fffdf9;
  box-shadow: 0 3px 12px #38251b08;
}

.aa-admin-products th {
  background: #eeeae2;
  padding: 13px;
  font-size: 11px;
}

.aa-admin-products td {
  padding: 13px;
  font-size: 12px;
}

.aa-admin-products tbody tr:hover {
  background: #faf6ef;
}

.aa-admin-product-heading {
  align-items: flex-start;
}

.aa-admin-filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.aa-admin-filter-actions button,
.aa-admin-product-heading > button {
  min-height: 39px;
  padding: 9px 14px;
  border: 1px solid #d8caba;
  border-radius: 8px;
  background: #fffdf9;
  color: #604735;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-admin-filter-actions button:hover,
.aa-admin-product-heading > button:hover {
  background: #eee7dc;
}

.aa-admin-workspace button:focus-visible {
  outline: 3px solid #b58a4b80;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .aa-rewards-backdrop:has(.aa-admin-workspace) {
    padding: 8px;
  }

  .aa-rewards-panel:has(.aa-admin-workspace) {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 13px;
  }

  .aa-rewards-panel:has(.aa-admin-workspace) .aa-rewards-content {
    padding: 18px;
  }

  .aa-admin-workspace {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .aa-admin-tabs {
    position: sticky;
    z-index: 5;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    padding: 6px;
    border-radius: 9px;
  }

  .aa-admin-tabs button {
    width: auto;
    min-width: max-content;
    min-height: 38px;
    text-align: center;
  }

  .aa-admin-workspace > section[data-admin-panel] {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 480px) {
  .aa-rewards-panel:has(.aa-admin-workspace) .aa-rewards-content {
    padding: 14px;
  }

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

  .aa-admin-product-heading {
    flex-direction: column;
  }

  .aa-admin-filters {
    grid-template-columns: 1fr;
  }
}
/* Admin customer management */
.aa-customer-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.aa-customer-filters {
  grid-template-columns: minmax(0, 1fr);
}

.aa-admin-customers-table {
  min-width: 850px;
}

.aa-admin-customers-table th {
  white-space: nowrap;
}

.aa-admin-customers-table td {
  vertical-align: middle;
}

.aa-customer-email {
  display: block;
  margin-top: 4px;
  color: #918477;
  font-size: 10px;
  overflow-wrap: anywhere;
}

.aa-customer-status {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 20px;
  font: 600 10px system-ui, sans-serif;
}

.aa-customer-status.is-active {
  background: #e8f1e6;
  color: #42623d;
}

.aa-customer-status.is-inactive {
  background: #f4e8e3;
  color: #8b5140;
}

.aa-admin-customer-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  color: #83766a;
  font: 11px system-ui, sans-serif;
}

.aa-admin-customer-pagination button {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid #d8caba;
  border-radius: 8px;
  background: #fffdf9;
  color: #604735;
  font: 600 11px system-ui, sans-serif;
  cursor: pointer;
}

.aa-admin-customer-pagination button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  .aa-customer-stats {
    grid-template-columns: 1fr;
  }

  .aa-admin-customer-pagination {
    justify-content: space-between;
  }
}