/* ==========================================================
   PPS CUSTOMER DASHBOARD
========================================================== */

.account-dashboard-page {
  padding-bottom: 30px;
}

.account-dashboard-hero {
  padding: 46px 0 28px;
}

.account-dashboard-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  padding: 42px 46px;
  border-radius: 32px;

  background:
    radial-gradient(circle at 90% 18%, rgba(77, 83, 159, .24), transparent 34%),
    radial-gradient(circle at 8% 10%, rgba(46, 47, 121, .15), transparent 30%),
    linear-gradient(135deg, #f8f9ff 0%, #eef0fb 48%, #f7f8fc 100%);

  border: 1px solid rgba(46, 47, 121, .12);
  box-shadow: 0 26px 64px rgba(31, 25, 84, .11);
}

.account-dashboard-eyebrow,
.account-dashboard-card__head span,
.account-dashboard-card__eyebrow {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.account-dashboard-hero h1 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1;
  letter-spacing: -.045em;
}

.account-dashboard-hero p {
  max-width: 720px;
  margin: 0;
  color: #686d84;
  font-size: 16px;
  line-height: 1.7;
}

.account-dashboard-hero__actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
}

.account-dashboard-signout {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.account-dashboard-signout:hover {
  text-decoration: underline;
}

.account-dashboard-section {
  padding: 34px 0 84px;
}

.account-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.account-dashboard-stat {
  padding: 24px;
  border-radius: 22px;
  border: 1px solid rgba(46, 47, 121, .11);
  background: #fff;
  box-shadow: 0 16px 40px rgba(31, 25, 84, .07);
}

.account-dashboard-stat span,
.account-dashboard-stat small {
  display: block;
}

.account-dashboard-stat span {
  color: #777c91;
  font-size: 13px;
  font-weight: 700;
}

.account-dashboard-stat strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--primary-dark);
  font-size: 34px;
  letter-spacing: -.04em;
}

.account-dashboard-stat small {
  color: #8a8ea1;
  font-size: 12px;
  line-height: 1.5;
}

.account-dashboard-stat__status {
  font-size: 22px !important;
  color: #28713b !important;
}

.account-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr);
  gap: 24px;
  align-items: start;
}

.account-dashboard-main,
.account-dashboard-sidebar {
  display: grid;
  gap: 24px;
  position: sticky;
  top: 24px;
  align-self: start;
  height: fit-content;
}

.account-dashboard-card {
  padding: 30px;
  border-radius: 26px;
  border: 1px solid rgba(46, 47, 121, .11);
  background: #fff;
  box-shadow: 0 18px 48px rgba(31, 25, 84, .08);
}

.account-dashboard-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.account-dashboard-card__head h2 {
  margin: 0;
  color: var(--primary-dark);
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -.03em;
}

.account-dashboard-card__head a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.account-dashboard-card__head a:hover {
  text-decoration: underline;
}

.latest-shipment-card{
    display:grid;
    gap:18px;
}

.latest-shipment-header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}

.latest-shipment-carrier{
    font-size:22px;
    font-weight:700;
    color:var(--color-heading);
}

.latest-shipment-order{
    color:var(--color-muted);
    font-size:.92rem;
    margin-top:4px;
}

.shipment-status-badge{
    padding:6px 12px;
    border-radius:999px;
    font-size:.78rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.shipment-status-badge.pending{
    background:#fff8e5;
    color:#9c6a00;
}

.shipment-status-badge.transit{
    background:#e9f4ff;
    color:#0b63b6;
}

.shipment-status-badge.delivery{
    background:#eef7ff;
    color:#1d4ed8;
}

.shipment-status-badge.delivered{
    background:#eaf8ef;
    color:#1b7f44;
}

.shipment-status-badge.exception{
    background:#fdecec;
    color:#c62828;
}

.latest-shipment-grid{
    display:grid;
    gap:12px;
}

.latest-shipment-item small{
    display:block;
    color:var(--color-muted);
    margin-bottom:2px;
}

.latest-shipment-item strong{
    font-size:.95rem;
    word-break:break-word;
}

.account-dashboard-empty {
  padding: 46px 24px;
  text-align: center;
  border: 1px dashed rgba(46, 47, 121, .18);
  border-radius: 22px;
  background: #f9faff;
}

.account-dashboard-empty--compact {
  padding: 30px 20px;
}

.account-dashboard-empty__icon {
  display: flex;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand-green-soft);
  color: #28713b;
  font-weight: 900;
}

.account-dashboard-empty h3 {
  margin: 0 0 8px;
  color: var(--primary-dark);
}

.account-dashboard-empty p {
  margin: 0 0 20px;
  color: #777c91;
  line-height: 1.65;
}

.account-active-orders {
  display: grid;
  gap: 18px;
}

.account-order-card {
  padding: 22px;
  border: 1px solid rgba(46, 47, 121, .11);
  border-radius: 22px;
  background: #fbfbfe;
}

.account-order-card__top,
.account-order-card__footer,
.account-recent-order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.account-order-card__number {
  display: block;
  color: var(--primary-dark);
  font-size: 16px;
  font-weight: 900;
}

.account-order-card__top small {
  display: block;
  margin-top: 4px;
  color: #85899b;
  font-size: 12px;
}

.account-order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.account-order-status--pending {
  background: #fff4df;
  color: #8a5a00;
}

.account-order-status--confirmed {
  background: #eef0ff;
  color: #35398a;
}

.account-order-status--processing {
  background: #e9f3ff;
  color: #1f5f9d;
}

.account-order-status--shipped {
  background: #e8f7ee;
  color: #28713b;
}

.account-order-status--completed {
  background: #e8f7ee;
  color: #28713b;
}

.account-order-status--cancelled {
  background: #fff0ef;
  color: #a7352d;
}

.account-order-card__progress {
  height: 8px;
  margin: 18px 0 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e9f2;
}

.account-order-card__progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--accent)
  );
}

.account-order-card__message {
  margin: 0 0 18px;
  color: #71768b;
  font-size: 13px;
  line-height: 1.6;
}

.account-order-products {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 20px 0;
}

.account-order-product {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.account-order-product__media {
  display: flex;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(46, 47, 121, .10);
}

.account-order-product__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.account-order-product__media span {
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.account-order-product strong,
.account-order-product small {
  display: block;
}

.account-order-product strong {
  max-width: 170px;
  color: var(--text-main);
  font-size: 12px;
  line-height: 1.4;
}

.account-order-product small {
  margin-top: 3px;
  color: #878b9d;
  font-size: 11px;
}

.account-order-card__footer {
  padding-top: 16px;
  border-top: 1px solid rgba(46, 47, 121, .09);
}

.account-order-card__footer span,
.account-order-card__footer strong {
  display: block;
}

.account-order-card__footer span {
  color: #85899b;
  font-size: 11px;
}

.account-order-card__footer strong {
  margin-top: 3px;
  color: var(--primary-dark);
  font-size: 16px;
}

.account-order-card__actions,
.account-recent-order__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.account-order-link,
.account-recent-order__actions a,
.account-recent-order__actions button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.account-order-link:hover,
.account-recent-order__actions a:hover {
  text-decoration: underline;
}

.account-order-link:disabled,
.account-recent-order__actions button:disabled {
  color: #aaaebe;
  cursor: not-allowed;
}

.account-recent-orders {
  display: grid;
}

.account-recent-order {
  padding: 15px 0;
  border-top: 1px solid rgba(46, 47, 121, .09);
}

.account-recent-order:first-child {
  padding-top: 0;
  border-top: 0;
}

.account-recent-order > div:first-child {
  min-width: 190px;
}

.account-recent-order > div:first-child strong,
.account-recent-order > div:first-child small {
  display: block;
}

.account-recent-order > div:first-child strong {
  color: var(--primary-dark);
  font-size: 13px;
}

.account-recent-order > div:first-child small {
  margin-top: 4px;
  color: #8b8fa2;
  font-size: 11px;
}

.account-dashboard-actions {
  display: grid;
  gap: 10px;
}

.account-dashboard-actions a {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 16px;
  background: #f8f9fd;
  color: var(--text-main);
  text-decoration: none;
  transition:
    background .2s ease,
    transform .2s ease;
}

.account-dashboard-actions a:hover {
  background: #eef0ff;
  transform: translateY(-1px);
}

.account-dashboard-actions strong {
  color: var(--primary-dark);
  font-size: 14px;
}

.account-dashboard-actions span {
  color: #7c8195;
  font-size: 12px;
  line-height: 1.5;
}

.account-dashboard-future {
  background:
    radial-gradient(circle at top right, rgba(77, 83, 159, .12), transparent 35%),
    #f8f9fd;
}

.account-dashboard-future h2 {
  margin: 0 0 10px;
  color: var(--primary-dark);
  font-size: 24px;
}

.account-dashboard-future p {
  margin: 0 0 18px;
  color: #72778d;
  font-size: 13px;
  line-height: 1.65;
}

.account-dashboard-future button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(46, 47, 121, .16);
  border-radius: 12px;
  background: #fff;
  color: #aaaebe;
  font-family: inherit;
  font-weight: 800;
}

@media (max-width: 1080px) {
  .account-dashboard-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .account-dashboard-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-dashboard-sidebar > :first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .account-dashboard-hero__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 32px 24px;
  }

  .account-dashboard-hero__actions {
    width: 100%;
    justify-content: space-between;
  }

  .account-dashboard-stats,
  .account-dashboard-sidebar {
    grid-template-columns: 1fr;
  }

  .account-dashboard-sidebar > :first-child {
    grid-column: auto;
  }

  .account-dashboard-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .account-order-card__top,
  .account-order-card__footer,
  .account-recent-order {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-recent-order__actions {
    width: 100%;
  }
}

/* =========================================================
   Order status badges
   ========================================================= */

.account-order-card__badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.account-payment-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.account-payment-status--paid {
  color: #247443;
  background: #e9f8ef;
  border-color: #bfe7cd;
}

.account-payment-status--pending,
.account-payment-status--unpaid {
  color: #8a5a00;
  background: #fff6df;
  border-color: #f1d89b;
}

.account-payment-status--failed {
  color: #a22a2a;
  background: #fff0f0;
  border-color: #efc2c2;
}

.account-payment-status--refunded {
  color: #4d539f;
  background: #eef0ff;
  border-color: #cfd3f5;
}


/* =========================================================
   Latest order activity
   ========================================================= */

.account-order-activity {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 15px 16px;
  border: 1px solid rgba(31, 25, 84, 0.1);
  border-radius: 16px;
  background:
    linear-gradient(
      135deg,
      rgba(238, 240, 255, 0.95),
      rgba(248, 249, 253, 0.98)
    );
}

.account-order-activity__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #ffffff;
  background: #1f1954;
  box-shadow: 0 8px 18px rgba(31, 25, 84, 0.18);
}

.account-order-activity__icon .material-icons {
  font-size: 21px;
}

.account-order-activity__content {
  min-width: 0;
}

.account-order-activity__content > span {
  display: block;
  margin-bottom: 3px;
  color: #6b6f89;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.account-order-activity__content strong {
  display: block;
  color: #1b2144;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.account-order-activity__content small {
  display: block;
  margin-top: 3px;
  color: #6b6f89;
  font-size: 12px;
  line-height: 1.45;
}

.account-order-activity time {
  align-self: start;
  color: #777b91;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 640px) {
  .account-order-card__top {
    align-items: flex-start;
  }

  .account-order-card__badges {
    justify-content: flex-start;
  }

  .account-order-activity {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .account-order-activity__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .account-order-activity time {
    grid-column: 2;
    margin-top: -4px;
    white-space: normal;
  }
}