/* ==========================================================
   Account page — scoped styles, layered on top of style.css
   Uses the same design tokens (brass / ink / paper) defined
   in :root so it stays visually consistent with the rest of
   the site.
   ========================================================== */

.acct-page {
  padding: var(--sp-5) 0 var(--sp-9);
}

/* ---------- Layout ---------- */
.acct-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-7);
  align-items: start;
}

@media (max-width: 860px) {
  .acct-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Profile card ---------- */
.acct-profile-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
  position: sticky;
  top: var(--sp-6);
}

@media (max-width: 860px) {
  .acct-profile-card {
    position: static;
  }
}

.acct-avatar {
  width: 72px;
  height: 72px;
  margin: 0 auto var(--sp-4);
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.acct-username {
  font-size: 1.1rem;
  margin: 0 0 2px;
}

.acct-email {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 var(--sp-5);
  word-break: break-word;
}

.acct-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: var(--sp-4) 0;
  margin-bottom: var(--sp-5);
}

.acct-stat+.acct-stat {
  border-left: 1px solid var(--line);
}

.acct-stat-num {
  display: block;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
}

.acct-stat-label {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.acct-logout {
  width: 100%;
  justify-content: center;
}

/* ---------- Orders section ---------- */
.acct-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}

.acct-section-head h2 {
  font-size: 1.15rem;
  margin: 0;
}

.acct-shop-link {
  font-size: 0.88rem;
  color: var(--brass-dark);
  text-decoration: none;
  white-space: nowrap;
}

.acct-shop-link:hover {
  text-decoration: underline;
}

.acct-orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* Each order is a native <details> disclosure — accessible,
   keyboard-friendly, no extra JS needed to expand/collapse. */
.acct-order {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.acct-order[open] {
  box-shadow: 0 6px 20px rgba(25, 23, 21, 0.06);
}

.acct-order-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  flex-wrap: wrap;
}

.acct-order-summary::-webkit-details-marker {
  display: none;
}

.acct-order-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.acct-order-id {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
}

.acct-order-date {
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.acct-order-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.acct-order-total {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  min-width: 92px;
  text-align: right;
}

.acct-chevron {
  width: 18px;
  height: 18px;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.acct-order[open] .acct-chevron {
  transform: rotate(180deg);
}

.acct-order-body {
  padding: 0 var(--sp-5) var(--sp-5);
  border-top: 1px solid var(--line);
}

.acct-order-items {
  list-style: none;
  margin: var(--sp-4) 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.acct-order-items li {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  font-size: 0.9rem;
  padding-bottom: var(--sp-2);
  border-bottom: 1px dashed var(--line);
}

.acct-order-items li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.acct-order-item-name {
  color: var(--ink);
}

.acct-order-item-qty {
  color: var(--ink-soft);
}

.acct-order-ship {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--sp-4);
  font-size: 0.86rem;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.acct-order-ship strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- Empty state ---------- */
.acct-empty {
  background: var(--paper-raised);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
}

.acct-empty svg {
  width: 40px;
  height: 40px;
  color: var(--brass);
  margin-bottom: var(--sp-4);
}

.acct-empty p {
  color: var(--ink-soft);
  margin-bottom: var(--sp-5);
}

/* ---------- Loading skeleton ---------- */
.acct-skeleton {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.acct-skel-block {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--line) 25%, var(--paper) 50%, var(--line) 75%);
  background-size: 400% 100%;
  animation: acct-shimmer 1.4s ease infinite;
}

@keyframes acct-shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .acct-skel-block {
    animation: none;
  }
}