
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  font-family: "DM Sans", sans-serif;
  color: #24352b;
  background: #f5f7f3;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --green: #176b43;
  --green-dark: #105334;
  --orange: #f39a38;
  --muted: #728075;
  --border: #e3e9e1;
  --surface: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.account-header {
  min-height: 78px;
  padding: 14px max(22px, calc((100% - 1120px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.account-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--green);
  color: white;
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  font-size: 14px;
}

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

.account-brand strong {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
}

.account-brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.back-to-shop {
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
}

.account-main {
  width: min(100% - 32px, 790px);
  margin: 0 auto;
  padding: 52px 0 30px;
}

.account-heading {
  margin-bottom: 26px;
}

.eyebrow,
.profile-label {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.account-heading h1 {
  margin: 10px 0;
  font-family: "Manrope", sans-serif;
  font-size: clamp(30px, 5vw, 42px);
  letter-spacing: -1.6px;
}

.heading-dot {
  color: var(--orange);
}

.account-heading p,
.guest-card > p {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.account-card {
  padding: clamp(20px, 5vw, 34px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 12px 38px rgb(24 57 34 / 5%);
}

[hidden] {
  display: none !important;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #e8f4eb;
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  font-weight: 800;
}

.profile-top h2,
.guest-card h2 {
  margin: 7px 0 4px;
  font-family: "Manrope", sans-serif;
  font-size: 20px;
}

.customer-email {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.account-status {
  margin-left: auto;
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 30px;
  background: #e9f6ed;
  color: #176b43;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.section-divider {
  height: 1px;
  margin: 28px 0;
  background: var(--border);
}

.account-card h3 {
  margin: 0 0 20px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.detail-item {
  min-width: 0;
}

.detail-item span,
.detail-item strong {
  display: block;
  overflow-wrap: anywhere;
}

.detail-item span {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  font-size: 14px;
  font-weight: 600;
}

.service-list {
  display: grid;
  gap: 12px;
}

.service-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: border-color 160ms ease, background 160ms ease;
}

.service-link:hover {
  border-color: #b8d6c1;
  background: #fbfdfb;
}

.service-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #edf6ef;
  color: var(--green);
  font-size: 21px;
}

.service-link > span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.service-link strong,
.service-link small {
  display: block;
}

.service-link strong {
  font-size: 14px;
}

.service-link small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.service-arrow {
  color: var(--green);
  font-size: 20px;
}

.logout-button {
  width: 100%;
  min-height: 48px;
  margin-top: 28px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border: 1px solid #efd7d4;
  border-radius: 12px;
  background: white;
  color: #a5362c;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.logout-button:hover {
  background: #fff8f7;
}

.logout-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.logout-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #e8b7b1;
  border-top-color: #a5362c;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.account-message {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff0ed;
  color: #a5362c;
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.account-message.success {
  background: #eaf6ed;
  color: var(--green-dark);
}

.guest-card {
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

.guest-icon {
  font-size: 38px;
}

.guest-card > p {
  max-width: 430px;
  margin: 10px auto 22px;
}

.guest-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button {
  min-height: 46px;
  padding: 13px 20px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
}

.primary-button {
  background: var(--green);
  color: white;
}

.primary-button:hover {
  background: var(--green-dark);
}

.secondary-button {
  border: 1px solid var(--border);
  background: white;
  color: var(--green);
}

.guest-shop-link {
  display: inline-block;
  margin-top: 24px;
  color: var(--green);
  font-size: 13px;
  font-weight: 600;
}

.account-footer {
  margin-top: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 560px) {
  .account-header {
    min-height: 70px;
    padding: 12px 16px;
  }

  .account-brand {
    gap: 9px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .account-brand strong {
    font-size: 13px;
  }

  .account-brand small {
    font-size: 10px;
  }

  .back-to-shop {
    font-size: 12px;
    white-space: nowrap;
  }

  .account-main {
    padding-top: 34px;
  }

  .profile-top {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-top > div:nth-child(2) {
    flex: 1;
    min-width: 0;
  }

  .account-status {
    margin-left: 0;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .service-link {
    padding: 12px;
    gap: 10px;
  }

  .service-link small {
    font-size: 11px;
  }
}



.orders-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.orders-heading h3 {
  margin: 0;
}

.orders-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.order-count {
  padding: 7px 10px;
  border-radius: 20px;
  background: #edf6ef;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.order-history-list {
  display: grid;
  gap: 14px;
}

.order-history-message {
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.order-history-message:empty {
  display: none;
}

.order-card {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: #fff;
}

.order-card__top,
.order-card__total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.order-card__number {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.order-card__date {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.order-status {
  padding: 6px 9px;
  border-radius: 20px;
  background: #f1f3f1;
  color: #526056;
  font-size: 10px;
  font-weight: 800;
  text-transform: capitalize;
  white-space: nowrap;
}

.order-status--pending {
  background: #fff3df;
  color: #87520c;
}

.order-status--completed,
.order-status--delivered {
  background: #e8f5eb;
  color: #176b43;
}

.order-status--cancelled,
.order-status--rejected {
  background: #fff0ed;
  color: #a5362c;
}

.order-items {
  display: grid;
  gap: 9px;
  margin: 17px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.order-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.6;
}

.order-item__name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.order-item__price {
  flex-shrink: 0;
  font-weight: 700;
}

.order-card__total {
  align-items: center;
}

.order-card__total span {
  color: var(--muted);
  font-size: 12px;
}

.order-card__total strong {
  color: var(--green);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
}

.order-card__delivery {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.load-more-orders {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.guest-icon img{
    height: 40px;
}

.load-more-orders:hover {
  background: #edf6ef;
}

@media (max-width: 480px) {
  .order-card {
    padding: 13px;
  }

  .order-card__top {
    flex-wrap: wrap;
  }

  .orders-heading {
    align-items: flex-start;
  }
}
