/* acctnav 2026-10-10 - left navigation for the customer account area (owner: "very good standard enterprise grade.
   left menu style"). Hand-written, NOT part of the generated shop_theme.css: it only uses the storefront tokens
   (--card, --border, --primary ...) so light and dark mode follow the visitor's choice automatically. */
.page-shell.acct-has-side {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  width: 100%;
  max-width: 1680px;   /* acctwide 2026-11-17 (owner): same width as the home page (.container 1640 + 2x20) */
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.acct-main { min-width: 0; }
.an-side {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 16px;
  box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.06));
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  scrollbar-width: none;
  font-family: var(--sans, Inter, system-ui, sans-serif);
}
.an-side::-webkit-scrollbar { display: none; }
.an-avatar svg { width: 20px; height: 20px; }
.an-user { display: flex; align-items: center; gap: 12px; padding: 4px 4px 2px; }
.an-avatar {
  flex: 0 0 auto;
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font: 700 17px var(--display, "Space Grotesk", sans-serif);
  color: hsl(var(--primary-foreground));
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
}
.an-user-text { display: flex; flex-direction: column; min-width: 0; }
.an-user-name { font-weight: 700; font-size: 14.5px; color: hsl(var(--foreground)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-user-role { font-size: 12px; color: hsl(var(--muted-foreground)); }
.an-wallet {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: hsl(var(--primary) / .07);
  border: 1px solid hsl(var(--primary) / .18);
}
.an-wallet-label { grid-column: 1; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.an-wallet-amount { grid-column: 1; font: 700 22px var(--display, "Space Grotesk", sans-serif); color: hsl(var(--foreground)); font-variant-numeric: tabular-nums; }
.an-wallet-btn {
  grid-column: 2; grid-row: 1 / span 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700; font-size: 13px;
  color: hsl(var(--primary-foreground)) !important;
  background: hsl(var(--primary));
  text-decoration: none !important;
  box-shadow: 0 6px 16px hsl(var(--primary) / .28);
  transition: transform .15s ease, box-shadow .15s ease;
}
.an-wallet-btn svg { width: 15px; height: 15px; }
.an-wallet-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px hsl(var(--primary) / .34); }
.an-nav { display: flex; flex-direction: column; gap: 6px; }
.an-group { display: flex; flex-direction: column; gap: 2px; }
.an-group-label { padding: 6px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: hsl(var(--muted-foreground)); }
.an-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
  color: hsl(var(--foreground) / .82) !important;
  text-decoration: none !important;
  transition: background-color .15s ease, color .15s ease;
}
.an-item svg { flex: 0 0 auto; width: 18px; height: 18px; color: hsl(var(--muted-foreground)); transition: color .15s ease; }
.an-item:hover { background: hsl(var(--muted)); color: hsl(var(--foreground)) !important; }
.an-item:hover svg { color: hsl(var(--foreground)); }
.an-item.is-active { background: hsl(var(--primary) / .1); color: hsl(var(--primary)) !important; }
.an-item.is-active svg { color: hsl(var(--primary)); }
.an-item.is-active::before {
  content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: hsl(var(--primary));
}
.an-item:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; }
.an-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-badge {
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: hsl(var(--primary-foreground));
  background: hsl(var(--success));
}
.an-foot { display: flex; flex-direction: column; gap: 2px; padding-top: 10px; border-top: 1px solid hsl(var(--border)); }
.an-signout:hover { background: hsl(var(--destructive) / .08); color: hsl(var(--destructive)) !important; }
.an-signout:hover svg { color: hsl(var(--destructive)); }

/* Page titles: the old dark design used white->lavender gradient TEXT (color: transparent + background-clip: text);
   the shared theme swapped that gradient for a pale muted fill, so titles read pale-grey on a pale page. Solid theme
   text colour instead - readable in light and dark. */
.page-shell .page-title {
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: hsl(var(--foreground)) !important;
  -webkit-text-fill-color: hsl(var(--foreground)) !important;
  font-family: var(--display, "Space Grotesk", sans-serif);
  letter-spacing: -0.02em;
}

/* Tablet / phone: the sidebar becomes a compact header block with a swipeable menu row. */
@media (max-width: 960px) {
  .page-shell.acct-has-side { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-left: 16px; padding-right: 16px; }
  .an-side { position: static; max-height: none; overflow: visible; padding: 12px; gap: 10px; }
  .an-user { display: none; }
  .an-wallet { padding: 10px 12px; }
  .an-wallet-amount { font-size: 19px; }
  .an-nav { flex-direction: row; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px 2px; }
  .an-nav::-webkit-scrollbar { display: none; }
  .an-group { flex: 0 0 auto; flex-direction: row; gap: 4px; }
  .an-group-label { display: none; }
  .an-item { flex: 0 0 auto; padding: 8px 12px; font-size: 13px; border: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
  .an-item.is-active::before { display: none; }
  .an-item.is-active { border-color: hsl(var(--primary) / .45); }
  .an-foot { flex-direction: row; gap: 6px; padding-top: 8px; }
  .an-foot .an-item { flex: 1 1 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .an-item, .an-item svg, .an-wallet-btn { transition: none; }
  .an-wallet-btn:hover { transform: none; }
}
