.auth-main {
  min-height: 62vh;
}

.auth-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  width: min(520px, 100%);
}

.auth-card h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 13px;
  color: var(--muted);
}

.auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.auth-form button,
#logout-btn {
  margin-top: 6px;
}

.auth-alt-actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-link-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.auth-link-btn:hover {
  text-decoration: underline;
}

.auth-link-sep {
  color: var(--muted);
}

.auth-message {
  min-height: 22px;
  margin: 6px 0 18px;
  font-weight: 600;
}

.auth-muted {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.account-info {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.account-info p {
  display: grid;
  gap: 7px;
  margin: 0;
  min-width: 0;
  padding: 14px;
  color: var(--text);
  border: 1px solid rgba(231, 233, 242, 0.88);
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
}

.account-info strong {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-info span {
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 800;
}

.account-dashboard {
  width: min(1080px, 100%);
  padding: clamp(20px, 3vw, 30px);
  border-radius: 26px;
  background:
    radial-gradient(circle at 8% 14%, rgba(108, 92, 231, 0.1), transparent 18rem),
    radial-gradient(circle at 92% 10%, rgba(0, 194, 168, 0.1), transparent 16rem),
    rgba(255, 255, 255, 0.96);
}

.account-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(231, 233, 242, 0.9);
}

.account-dashboard-header h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.8px;
}

.account-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 6px 11px;
  color: var(--primary);
  border: 1px solid rgba(108, 92, 231, 0.16);
  border-radius: 999px;
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-dashboard-card {
  border: 1px solid rgba(231, 233, 242, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.07);
  backdrop-filter: blur(14px);
}

.account-dashboard > .account-info {
  padding: 16px;
  margin-bottom: 18px;
}

.account-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(360px, 1.18fr);
  gap: 18px;
  align-items: start;
}

.account-password,
.account-orders {
  margin: 0;
  padding: 20px;
}

.account-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.account-section-heading h3 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.3px;
}

.account-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.account-section-icon {
  display: inline-grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  font-size: 20px;
}

.account-password .auth-form {
  gap: 11px;
}

.account-password .btn {
  width: 100%;
  margin-top: 10px;
}

.account-orders {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: 520px;
  overflow: hidden;
}

.account-orders::after {
  content: "";
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  height: 34px;
  border-radius: 0 0 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.96));
  pointer-events: none;
}

#recent-orders-list {
  display: grid;
  gap: 12px;
  flex: 1;
  max-height: 360px;
  margin: 10px -6px 0 0;
  padding: 0 6px 42px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(108, 92, 231, 0.5) rgba(236, 233, 255, 0.8);
}

#recent-orders-list::-webkit-scrollbar {
  width: 8px;
}

#recent-orders-list::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(236, 233, 255, 0.8);
}

#recent-orders-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.recent-order-item {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(231, 233, 242, 0.92);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #fbfcff);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.05);
}

.recent-order-summary {
  font-weight: 700;
  color: var(--text);
}

.recent-order-products {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.recent-order-actions {
  display: flex;
  justify-content: flex-start;
}

.resume-payment-btn {
  width: fit-content;
}

@media (max-width: 960px) {
  .auth-card,
  .account-dashboard {
    width: 100%;
  }

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

  .account-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-dashboard-header .btn {
    width: 100%;
  }

  .account-orders {
    max-height: 480px;
  }

  #recent-orders-list {
    max-height: 320px;
  }
}
