/* ======================================================================
   Customer dashboard — dark-gold account area.
   Scoped to body.customer-account-page (excluding the auth-reference
   login/signup pages) plus the standalone /account/orders list.
   2026-10-25 Task 4.
   ====================================================================== */

body.customer-account-page:not(.auth-reference) {
  --cd-bg: oklch(0.16 0.02 50);
  --cd-surface: oklch(0.2 0.02 50);
  --cd-surface-raised: oklch(0.23 0.022 52);
  --cd-input: oklch(0.17 0.018 50);
  --cd-text: oklch(0.93 0.028 85);
  --cd-muted: oklch(0.66 0.035 76);
  --cd-faint: oklch(0.52 0.03 72);
  --cd-gold: oklch(0.8 0.11 82);
  --cd-gold-light: oklch(0.88 0.09 87);
  --cd-line: oklch(0.32 0.04 68);
  --cd-line-soft: oklch(0.32 0.04 68 / 0.55);
  --cd-gold-soft: oklch(0.8 0.11 82 / 0.1);
  --cd-danger: oklch(0.72 0.15 28);
  --cd-ok: oklch(0.78 0.13 145);
  --cd-gold-gradient: linear-gradient(110deg, var(--cd-gold), var(--cd-gold-light));
  --cd-serif: "Cormorant Garamond", Georgia, serif;
  --cd-sans: Jost, "Helvetica Neue", Arial, sans-serif;
  --cd-mono: "JetBrains Mono", "DM Mono", monospace;
  background: var(--cd-bg);
  color: var(--cd-text);
  font-family: var(--cd-sans);
}

body.customer-account-page:not(.auth-reference) .customer-dashboard {
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

body.customer-account-page:not(.auth-reference) .cd-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(36px, 6vh, 64px) 0 96px;
  width: 100%;
}

/* ---------- Sidebar -------------------------------------------------- */

body.customer-account-page:not(.auth-reference) .cd-sidebar {
  border-right: 1px solid var(--cd-line-soft);
  padding-right: 18px;
  align-self: start;
  position: sticky;
  top: 100px;
}

body.customer-account-page:not(.auth-reference) .cd-eyebrow {
  color: var(--cd-gold);
  font: 400 10px/1.6 var(--cd-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 18px;
}

body.customer-account-page:not(.auth-reference) .cd-sidebar-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--cd-line-soft);
  text-decoration: none;
  min-width: 0;
}

body.customer-account-page:not(.auth-reference) .cd-sidebar-identity:hover strong { color: var(--cd-gold-light); }

body.customer-account-page:not(.auth-reference) .cd-sidebar-identity-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.customer-account-page:not(.auth-reference) .cd-sidebar-identity-copy strong {
  color: var(--cd-text);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 160ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-sidebar-identity-copy small {
  color: var(--cd-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cd-surface-raised);
  border: 1px solid var(--cd-line);
  display: inline-grid;
  place-items: center;
  color: var(--cd-gold);
  font-family: var(--cd-serif);
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

body.customer-account-page:not(.auth-reference) .cd-avatar img,
body.customer-account-page:not(.auth-reference) .cd-avatar .cd-avatar-initials {
  grid-area: 1 / 1;
}

body.customer-account-page:not(.auth-reference) .cd-avatar img,
body.customer-account-page:not(.auth-reference) .cd-avatar [data-profile-photo] {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.customer-account-page:not(.auth-reference) .cd-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

body.customer-account-page:not(.auth-reference) .cd-nav a {
  display: flex;
  align-items: center;
  min-height: 45px;
  padding: 8px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: var(--cd-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-nav a:hover {
  color: var(--cd-text);
  background: oklch(1 1 1 / 0.03);
}

body.customer-account-page:not(.auth-reference) .cd-nav a[aria-current="page"] {
  color: var(--cd-text);
  border-left-color: var(--cd-gold);
  background: var(--cd-gold-soft);
}

/* ---------- Compact context-aware top bar ---------------------------- */

body.customer-account-page:not(.auth-reference) .cd-content { min-width: 0; }

body.customer-account-page:not(.auth-reference) .cd-topbar {
  align-items: end;
  border-bottom: 1px solid var(--cd-line-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 22px;
}

body.customer-account-page:not(.auth-reference) .cd-topbar .cd-eyebrow { margin-bottom: 8px; }

body.customer-account-page:not(.auth-reference) .cd-topbar-title {
  font-family: var(--cd-serif);
  font-size: clamp(30px, 3.2vw, 44px);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.06;
  margin: 0;
  max-width: none;
}

body.customer-account-page:not(.auth-reference) .cd-title-greeting span[data-customer-name] {
  color: var(--cd-gold-light);
  font-style: italic;
}

body.customer-account-page:not(.auth-reference) .cd-topbar-sub {
  color: var(--cd-muted);
  font-size: 13px;
  margin: 8px 0 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

body.customer-account-page:not(.auth-reference) .cd-topbar-actions {
  display: flex;
  flex-shrink: 0;
  gap: 10px;
}

body.customer-account-page:not(.auth-reference) .cd-topbar-actions:empty { display: none; }

body.customer-account-page:not(.auth-reference) a.cd-topbar-link { text-decoration: none; }

body.customer-account-page:not(.auth-reference) .cd-profile-country {
  color: var(--cd-faint);
  font: 400 10px/1.6 var(--cd-mono);
  letter-spacing: 0.08em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

/* ---------- Sidebar nav badges --------------------------------------- */

body.customer-account-page:not(.auth-reference) .cd-nav-badge {
  background: var(--cd-gold);
  border-radius: 999px;
  color: oklch(0.2 0.03 60);
  font: 600 10px/1 var(--cd-mono);
  margin-inline-start: auto;
  min-width: 20px;
  padding: 4px 7px;
  text-align: center;
}

body.customer-account-page:not(.auth-reference) .cd-nav-badge-dot {
  background: var(--cd-gold);
  min-width: 0;
  padding: 0;
  height: 9px;
  width: 9px;
}

body.customer-account-page:not(.auth-reference) .cd-nav a[aria-current="page"] .cd-nav-badge {
  box-shadow: 0 0 0 2px var(--cd-bg);
}

/* ---------- Attention cards (overview automation) -------------------- */

body.customer-account-page:not(.auth-reference) .cd-attention {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 24px;
}

body.customer-account-page:not(.auth-reference) .cd-attention-card {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-inline-start: 3px solid var(--cd-gold);
  border-radius: 8px;
  color: var(--cd-text);
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 14px 16px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-attention-card:hover {
  border-color: var(--cd-gold);
  transform: translateY(-1px);
}

body.customer-account-page:not(.auth-reference) .cd-attention-card strong { font-size: 13.5px; font-weight: 500; }

body.customer-account-page:not(.auth-reference) .cd-attention-card span {
  color: var(--cd-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-unread { border-inline-start-color: var(--cd-gold-light); }
body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-waiting { border-inline-start-color: oklch(0.75 0.12 70); }
body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-progress { border-inline-start-color: var(--cd-ok); }
body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-action { border-inline-start-color: oklch(0.7 0.1 35); }

/* ---------- Section toolbars, chips, view toggle --------------------- */

body.customer-account-page:not(.auth-reference) .cd-toolbar,
body.customer-account-page:not(.auth-reference) .cd-enq-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body.customer-account-page:not(.auth-reference) .cd-toolbar { margin: 18px 0 4px; }

body.customer-account-page:not(.auth-reference) .cd-enq-tools {
  border-bottom: 1px solid var(--cd-line-soft);
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
}

body.customer-account-page:not(.auth-reference) .cd-toolbar-search { flex: 1 1 180px; min-width: 160px; }

body.customer-account-page:not(.auth-reference) input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
}

body.customer-account-page:not(.auth-reference) .cd-toolbar-search input[type="search"] {
  min-height: 38px;
  width: 100%;
}

body.customer-account-page:not(.auth-reference) .cd-toolbar-select { flex: 0 0 auto; }

body.customer-account-page:not(.auth-reference) .cd-toolbar-select select { min-height: 38px; width: auto; }

body.customer-account-page:not(.auth-reference) .cd-chip-row {
  display: flex;
  flex-shrink: 0;
  flex-wrap: wrap;
  gap: 6px;
}

body.customer-account-page:not(.auth-reference) .cd-chip {
  background: transparent;
  border: 1px solid var(--cd-line);
  border-radius: 999px;
  color: var(--cd-muted);
  cursor: pointer;
  font-family: var(--cd-sans);
  font-size: 12.5px;
  font-weight: 500;
  min-height: 34px;
  padding: 6px 14px;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-chip:hover { border-color: var(--cd-gold); color: var(--cd-text); }

body.customer-account-page:not(.auth-reference) .cd-chip.is-active {
  background: var(--cd-gold-soft);
  border-color: var(--cd-gold);
  color: var(--cd-gold-light);
}

body.customer-account-page:not(.auth-reference) .cd-chip-count {
  font: 600 10px/1 var(--cd-mono);
  margin-inline-start: 4px;
}

body.customer-account-page:not(.auth-reference) .cd-chip-count:empty { display: none; }

body.customer-account-page:not(.auth-reference) .cd-view-toggle {
  border: 1px solid var(--cd-line);
  border-radius: 6px;
  display: inline-flex;
  flex-shrink: 0;
  overflow: hidden;
}

body.customer-account-page:not(.auth-reference) .cd-view-button {
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--cd-muted);
  cursor: pointer;
  font-family: var(--cd-sans);
  font-size: 12.5px;
  font-weight: 500;
  min-height: 36px;
  min-width: 52px;
  padding: 6px 12px;
}

body.customer-account-page:not(.auth-reference) .cd-view-button + .cd-view-button { border-inline-start: 1px solid var(--cd-line); }

body.customer-account-page:not(.auth-reference) .cd-view-button.is-active {
  background: var(--cd-gold-soft);
  color: var(--cd-gold-light);
}

body.customer-account-page:not(.auth-reference) .cd-filter-empty { font-style: italic; }

/* ---------- Cards, forms, buttons ------------------------------------ */

body.customer-account-page:not(.auth-reference) .cd-card {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: 8px;
  padding: clamp(22px, 2.4vw, 30px);
}

body.customer-account-page:not(.auth-reference) .cd-card-title {
  font-family: var(--cd-serif);
  font-size: clamp(26px, 2.4vw, 34px);
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 22px;
}

body.customer-account-page:not(.auth-reference) .cd-section-title {
  font-family: var(--cd-serif);
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 400;
  line-height: 1.08;
  margin: 0;
}

body.customer-account-page:not(.auth-reference) .cd-section-note {
  color: var(--cd-muted);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 10px 0 0;
  max-width: 620px;
}

body.customer-account-page:not(.auth-reference) .cd-section-head {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 26px;
}

body.customer-account-page:not(.auth-reference) .cd-section-head .cd-section-title { margin-bottom: 0; }

body.customer-account-page:not(.auth-reference) label {
  color: var(--cd-muted);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

body.customer-account-page:not(.auth-reference) .cd-label-private { color: var(--cd-faint); font-weight: 400; }

body.customer-account-page:not(.auth-reference) input[type="text"],
body.customer-account-page:not(.auth-reference) input[type="tel"],
body.customer-account-page:not(.auth-reference) input[type="email"],
body.customer-account-page:not(.auth-reference) input[type="password"],
body.customer-account-page:not(.auth-reference) input[type="search"],
body.customer-account-page:not(.auth-reference) select,
body.customer-account-page:not(.auth-reference) textarea {
  background: var(--cd-input);
  border: 1px solid var(--cd-line);
  border-radius: 6px;
  color: var(--cd-text);
  font-family: var(--cd-sans);
  font-size: 14px;
  min-height: 44px;
  padding: 0 14px;
  width: 100%;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

body.customer-account-page:not(.auth-reference) textarea {
  min-height: 96px;
  padding: 12px 14px;
  resize: vertical;
}

body.customer-account-page:not(.auth-reference) input:focus,
body.customer-account-page:not(.auth-reference) select:focus,
body.customer-account-page:not(.auth-reference) textarea:focus {
  border-color: var(--cd-gold);
  box-shadow: 0 0 0 3px oklch(0.8 0.11 82 / 0.15);
  outline: none;
}

body.customer-account-page:not(.auth-reference) input[readonly] { color: var(--cd-faint); }

body.customer-account-page:not(.auth-reference) select option { background: var(--cd-surface); color: var(--cd-text); }

body.customer-account-page:not(.auth-reference) .cd-gold-button,
body.customer-account-page:not(.auth-reference) .cd-outline-button,
body.customer-account-page:not(.auth-reference) .cd-text-button,
body.customer-account-page:not(.auth-reference) .cd-file-label {
  align-items: center;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  font-family: var(--cd-sans);
  font-size: 13.5px;
  font-weight: 500;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 8px 18px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-gold-button {
  background: var(--cd-gold-gradient);
  border: 1px solid transparent;
  color: oklch(0.2 0.03 60);
}

body.customer-account-page:not(.auth-reference) .cd-gold-button:hover { box-shadow: 0 6px 22px oklch(0.8 0.11 82 / 0.22); }

body.customer-account-page:not(.auth-reference) .cd-gold-button:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

body.customer-account-page:not(.auth-reference) .cd-outline-button {
  background: transparent;
  border: 1px solid var(--cd-line);
  color: var(--cd-text);
}

body.customer-account-page:not(.auth-reference) .cd-outline-button:hover { border-color: var(--cd-gold); color: var(--cd-gold-light); }

body.customer-account-page:not(.auth-reference) .cd-text-button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--cd-muted);
  min-height: 36px;
  padding: 6px 10px;
}

body.customer-account-page:not(.auth-reference) .cd-text-button:hover { color: var(--cd-gold-light); }

body.customer-account-page:not(.auth-reference) .cd-file-label {
  background: transparent;
  border: 1px solid var(--cd-line);
  color: var(--cd-text);
  position: relative;
}

body.customer-account-page:not(.auth-reference) .cd-file-label:hover { border-color: var(--cd-gold); color: var(--cd-gold-light); }

body.customer-account-page:not(.auth-reference) .cd-file-label input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

body.customer-account-page:not(.auth-reference) .cd-text-link {
  color: var(--cd-gold);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-text-link:hover { color: var(--cd-gold-light); }

body.customer-account-page:not(.auth-reference) .cd-form-message {
  font-size: 13px;
  line-height: 1.6;
  margin: 14px 0 0;
}

body.customer-account-page:not(.auth-reference) .cd-form-message.is-error { color: var(--cd-danger); }
body.customer-account-page:not(.auth-reference) .cd-form-message:not(.is-error) { color: var(--cd-ok); }

body.customer-account-page:not(.auth-reference) .cd-empty-note {
  color: var(--cd-muted);
  font-size: 13.5px;
  line-height: 1.7;
  margin: 18px 0 0;
}

/* Display utilities like flex/grid otherwise override the hidden attribute. */
body.customer-account-page:not(.auth-reference) [hidden] { display: none !important; }

body.customer-account-page:not(.auth-reference) .cd-empty-note a { color: var(--cd-gold); }

body.customer-account-page:not(.auth-reference) .cd-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body.customer-account-page:not(.auth-reference) :focus-visible {
  outline: 2px solid var(--cd-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Profile section ------------------------------------------ */

body.customer-account-page:not(.auth-reference) .cd-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 24px;
  align-items: start;
}

body.customer-account-page:not(.auth-reference) .cd-profile-aside {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

body.customer-account-page:not(.auth-reference) .cd-photo-form {
  align-items: center;
  border-bottom: 1px solid var(--cd-line-soft);
  display: flex;
  gap: 18px;
  margin-bottom: 24px;
  padding-bottom: 24px;
}

body.customer-account-page:not(.auth-reference) .cd-avatar-large { width: 72px; height: 72px; font-size: 30px; }

body.customer-account-page:not(.auth-reference) .cd-photo-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

body.customer-account-page:not(.auth-reference) .cd-photo-controls small {
  color: var(--cd-faint);
  flex-basis: 100%;
  font-size: 11.5px;
  line-height: 1.5;
}

body.customer-account-page:not(.auth-reference) .cd-profile-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 18px;
}

body.customer-account-page:not(.auth-reference) .cd-profile-form label { display: flex; flex-direction: column; gap: 7px; }

body.customer-account-page:not(.auth-reference) .cd-profile-form button[type="submit"] {
  grid-column: 1;
  justify-self: start;
  margin-top: 4px;
}

/* ---------- Stat tiles + recent orders ------------------------------- */

body.customer-account-page:not(.auth-reference) .cd-stats {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.customer-account-page:not(.auth-reference) .cd-stat {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px;
}

body.customer-account-page:not(.auth-reference) .cd-stat-label {
  color: var(--cd-muted);
  font: 400 9.5px/1.5 var(--cd-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.customer-account-page:not(.auth-reference) .cd-stat-value {
  color: var(--cd-text);
  font-family: var(--cd-sans);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

/* A month/year label reads better in the display serif than bare digits do. */
body.customer-account-page:not(.auth-reference) .cd-stat-value[data-cd-stat="member_since"] {
  font-family: var(--cd-serif);
  font-size: 28px;
  font-weight: 500;
}

body.customer-account-page:not(.auth-reference) .cd-card-head {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

body.customer-account-page:not(.auth-reference) .cd-card-head h2 {
  font-family: var(--cd-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0;
}

body.customer-account-page:not(.auth-reference) .cd-table-scroll { overflow-x: auto; }

/* The recent-orders table lives inside a narrow aside card; it must fit. */
body.customer-account-page:not(.auth-reference) .cd-table.cd-table-recent {
  font-size: 12px;
  min-width: 0;
  table-layout: fixed;
}

body.customer-account-page:not(.auth-reference) .cd-table-recent th,
body.customer-account-page:not(.auth-reference) .cd-table-recent td {
  overflow-wrap: anywhere;
  padding-right: 8px;
}

body.customer-account-page:not(.auth-reference) .cd-table-recent th:nth-child(1),
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(1) { width: 74px; }
body.customer-account-page:not(.auth-reference) .cd-table-recent th:nth-child(3),
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(3) { width: 80px; white-space: nowrap; }
body.customer-account-page:not(.auth-reference) .cd-table-recent th:nth-child(4),
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(4) { width: 102px; }
body.customer-account-page:not(.auth-reference) .cd-table-recent th:nth-child(5),
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(5) { width: 34px; text-align: center; }
body.customer-account-page:not(.auth-reference) .cd-table-recent th:nth-child(6),
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(6) { width: 40px; white-space: nowrap; }
body.customer-account-page:not(.auth-reference) .cd-table-recent .cd-status-pill { white-space: normal; }
body.customer-account-page:not(.auth-reference) .cd-table-recent td:nth-child(5) { text-align: center; }

body.customer-account-page:not(.auth-reference) .cd-table {
  border-collapse: collapse;
  font-size: 13px;
  min-width: 520px;
  width: 100%;
}

body.customer-account-page:not(.auth-reference) .cd-table th {
  border-bottom: 1px solid var(--cd-line);
  color: var(--cd-muted);
  font: 400 9.5px/1.5 var(--cd-mono);
  letter-spacing: 0.12em;
  padding: 0 10px 10px 0;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-table td {
  border-bottom: 1px solid var(--cd-line-soft);
  color: var(--cd-text);
  padding: 13px 10px 13px 0;
  vertical-align: middle;
}

body.customer-account-page:not(.auth-reference) .cd-table tbody tr:last-child td { border-bottom: 0; }

body.customer-account-page:not(.auth-reference) .cd-table .cd-order-id {
  font-family: var(--cd-mono);
  font-size: 11px;
  color: var(--cd-gold);
}

body.customer-account-page:not(.auth-reference) .cd-status-pill {
  border: 1px solid var(--cd-line);
  border-radius: 999px;
  color: var(--cd-muted);
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-status-pill.cd-status-delivered { border-color: oklch(0.5 0.1 145); color: var(--cd-ok); }
body.customer-account-page:not(.auth-reference) .cd-status-pill.cd-status-cancelled { border-color: oklch(0.5 0.12 28); color: var(--cd-danger); }
body.customer-account-page:not(.auth-reference) .cd-status-pill.cd-status-active { border-color: oklch(0.55 0.1 80); color: var(--cd-gold-light); }

/* ---------- Wishlist -------------------------------------------------- */

body.customer-account-page:not(.auth-reference) .customer-favorites-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 24px;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-card {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 160ms ease, transform 160ms ease;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-card:hover {
  border-color: var(--cd-gold);
  transform: translateY(-2px);
}

body.customer-account-page:not(.auth-reference) .customer-favorite-card > a { color: var(--cd-text); }

body.customer-account-page:not(.auth-reference) .customer-favorite-card img {
  aspect-ratio: 4 / 3;
  background: var(--cd-input);
  object-fit: contain;
  padding: 14px;
  width: 100%;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-details strong { font-size: 14.5px; font-weight: 500; }

body.customer-account-page:not(.auth-reference) .customer-favorite-details > span {
  color: var(--cd-muted);
  font: 400 9px/1.5 var(--cd-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-details .customer-favorite-saved {
  color: var(--cd-faint);
  font: 400 9.5px/1.5 var(--cd-sans);
  letter-spacing: 0;
  text-transform: none;
}

body.customer-account-page:not(.auth-reference) .customer-favorite-remove {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: var(--cd-danger);
  cursor: pointer;
  font-size: 11.5px;
  margin: 0 14px 14px;
  padding: 4px 0;
  text-decoration: underline;
}

/* List view: one compact row per saved piece. */
body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view {
  grid-template-columns: minmax(0, 1fr);
}

body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
}

body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-card > a {
  display: contents;
}

body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-card img {
  aspect-ratio: 1 / 1;
  grid-row: 1;
  padding: 8px;
}

body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-details {
  padding: 10px 14px;
}

body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-remove {
  margin: 0 14px;
}

/* ---------- Orders workspace embedded in the account shell ----------- */

body.customer-account-page:not(.auth-reference) .cd-panel > .sv-order-list {
  background: transparent;
  margin: 0;
  padding: 0;
}

body.customer-account-page:not(.auth-reference) .sv-order-list .sv-orders-intro-embed {
  color: var(--cd-muted);
  font-size: 13.5px;
  margin: 0 0 18px;
  max-width: 70ch;
}

body.customer-account-page:not(.auth-reference) .sv-order-list article { background: var(--cd-surface); }

body.customer-account-page:not(.auth-reference) .sv-order-list .sv-orders-sort {
  align-items: center;
  color: var(--cd-muted);
  display: inline-flex;
  font-size: 12.5px;
  gap: 8px;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .sv-order-list .sv-orders-sort select {
  margin: 0;
  min-height: 38px;
  width: auto;
}

/* ---------- Enquiries: resizable two-pane ---------------------------- */

body.customer-account-page:not(.auth-reference) .cd-enquiries {
  background: var(--cd-surface);
  border: 1px solid var(--cd-line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: var(--cd-enq-list-w, 300px) 10px minmax(0, 1fr);
  min-height: 560px;
  overflow: hidden;
}

body.customer-account-page:not(.auth-reference) .cd-enq-list-pane {
  border-right: 1px solid var(--cd-line-soft);
  display: flex;
  flex-direction: column;
  min-height: 560px;
  min-width: 0;
}

body.customer-account-page:not(.auth-reference) .cd-enq-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

body.customer-account-page:not(.auth-reference) .cd-enq-item {
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0 6px 6px 0;
  color: inherit;
  cursor: pointer;
  display: block;
  font-family: var(--cd-sans);
  padding: 12px 14px;
  text-align: start;
  width: 100%;
}

body.customer-account-page:not(.auth-reference) .cd-enq-item:hover { background: oklch(1 1 1 / 0.03); }

body.customer-account-page:not(.auth-reference) .cd-enq-item[aria-current="true"] {
  background: var(--cd-gold-soft);
  border-left-color: var(--cd-gold);
}

body.customer-account-page:not(.auth-reference) .cd-enq-item-title {
  color: var(--cd-text);
  display: flex;
  font-size: 13.5px;
  font-weight: 500;
  gap: 8px;
  justify-content: space-between;
}

body.customer-account-page:not(.auth-reference) .cd-enq-item-title time {
  color: var(--cd-faint);
  font: 400 10px var(--cd-mono);
  font-weight: 400;
}

body.customer-account-page:not(.auth-reference) .cd-enq-item-preview {
  color: var(--cd-muted);
  display: block;
  font-size: 12.5px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-enq-unread {
  align-self: center;
  background: var(--cd-gold);
  border-radius: 999px;
  color: oklch(0.2 0.03 60);
  font: 400 10px/1 var(--cd-mono);
  min-width: 18px;
  padding: 3px 6px;
  text-align: center;
}

body.customer-account-page:not(.auth-reference) .cd-enq-divider {
  cursor: col-resize;
  position: relative;
}

body.customer-account-page:not(.auth-reference) .cd-enq-divider::before {
  background: var(--cd-line-soft);
  content: "";
  position: absolute;
  inset: 0 4px;
  transition: background-color 140ms ease;
}

body.customer-account-page:not(.auth-reference) .cd-enq-divider:hover::before,
body.customer-account-page:not(.auth-reference) .cd-enq-divider.cd-dragging::before { background: var(--cd-gold); }

body.customer-account-page:not(.auth-reference) .cd-enq-thread {
  display: flex;
  flex-direction: column;
  min-height: 560px;
  min-width: 0;
}

body.customer-account-page:not(.auth-reference) .cd-enq-thread-head {
  align-items: center;
  border-bottom: 1px solid var(--cd-line-soft);
  display: flex;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
}

body.customer-account-page:not(.auth-reference) .cd-enq-thread-head h3 {
  font-family: var(--cd-serif);
  font-size: 20px;
  font-weight: 400;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.customer-account-page:not(.auth-reference) .cd-enq-back { display: none; }

body.customer-account-page:not(.auth-reference) .cd-enq-empty {
  align-items: center;
  color: var(--cd-muted);
  display: flex;
  flex: 1;
  font-size: 14px;
  justify-content: center;
  margin: 0;
  padding: 24px;
  text-align: center;
}

body.customer-account-page:not(.auth-reference) .cd-enq-messages {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 12px;
  overflow-y: auto;
  padding: 20px;
}

body.customer-account-page:not(.auth-reference) .cd-enq-msg {
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 78%;
  padding: 11px 15px;
  word-break: break-word;
}

body.customer-account-page:not(.auth-reference) .cd-enq-msg.cd-is-admin {
  align-self: flex-start;
  background: var(--cd-surface-raised);
  border: 1px solid var(--cd-line-soft);
}

body.customer-account-page:not(.auth-reference) .cd-enq-msg:not(.cd-is-admin) {
  align-self: flex-end;
  background: var(--cd-gold-soft);
  border: 1px solid oklch(0.8 0.11 82 / 0.3);
}

body.customer-account-page:not(.auth-reference) .cd-enq-msg-meta {
  color: var(--cd-faint);
  display: block;
  font: 400 9.5px var(--cd-mono);
  letter-spacing: 0.08em;
  margin-bottom: 5px;
  text-transform: uppercase;
}

body.customer-account-page:not(.auth-reference) .cd-enq-msg p { margin: 0; }

body.customer-account-page:not(.auth-reference) .cd-enq-msg a { color: var(--cd-gold); }

body.customer-account-page:not(.auth-reference) .cd-enq-form {
  border-top: 1px solid var(--cd-line-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

body.customer-account-page:not(.auth-reference) .cd-enq-form textarea { min-height: 74px; }

body.customer-account-page:not(.auth-reference) .cd-enq-form-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

/* ---------- Address book --------------------------------------------- */

body.customer-account-page:not(.auth-reference) .cd-address-list {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-bottom: 22px;
}

body.customer-account-page:not(.auth-reference) .cd-address-card { padding: 20px 22px; }

body.customer-account-page:not(.auth-reference) .cd-address-card-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

body.customer-account-page:not(.auth-reference) .cd-address-card-head strong { font-size: 14.5px; font-weight: 500; }

body.customer-account-page:not(.auth-reference) .cd-default-badge {
  border: 1px solid oklch(0.55 0.1 80);
  border-radius: 999px;
  color: var(--cd-gold-light);
  font: 400 9px/1 var(--cd-mono);
  letter-spacing: 0.1em;
  padding: 4px 8px;
  text-transform: uppercase;
}

body.customer-account-page:not(.auth-reference) .cd-address-card p {
  color: var(--cd-muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}

body.customer-account-page:not(.auth-reference) .cd-address-actions { display: flex; gap: 6px; margin-top: 12px; }

body.customer-account-page:not(.auth-reference) .cd-address-form { margin-top: 8px; max-width: 760px; }

body.customer-account-page:not(.auth-reference) .cd-address-form h3 {
  font-family: var(--cd-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 18px;
}

body.customer-account-page:not(.auth-reference) .cd-form-grid {
  display: grid;
  gap: 14px 16px;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 14px;
}

body.customer-account-page:not(.auth-reference) .cd-form-grid label { display: flex; flex-direction: column; gap: 7px; }

body.customer-account-page:not(.auth-reference) .cd-span-two { grid-column: 1 / -1; }

body.customer-account-page:not(.auth-reference) .cd-check-label {
  align-items: center;
  color: var(--cd-muted);
  display: flex;
  flex-direction: row;
  font-size: 13px;
  gap: 9px;
}

body.customer-account-page:not(.auth-reference) .cd-check-label input { width: auto; min-height: 0; }

body.customer-account-page:not(.auth-reference) .cd-form-actions { display: flex; gap: 12px; margin-top: 18px; }

/* ---------- Security -------------------------------------------------- */

body.customer-account-page:not(.auth-reference) .cd-security-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 22px;
}

body.customer-account-page:not(.auth-reference) .cd-security-form { display: flex; flex-direction: column; gap: 14px; }

body.customer-account-page:not(.auth-reference) .cd-security-form label { display: flex; flex-direction: column; gap: 7px; }

body.customer-account-page:not(.auth-reference) .cd-security-form h3,
body.customer-account-page:not(.auth-reference) .cd-security-grid .cd-card h3 {
  font-family: var(--cd-serif);
  font-size: 24px;
  font-weight: 400;
  margin: 0 0 4px;
}

body.customer-account-page:not(.auth-reference) .cd-security-form small { color: var(--cd-faint); font-size: 12px; line-height: 1.6; }
body.customer-account-page:not(.auth-reference) .cd-security-form button { align-self: flex-start; }

/* ---------- Standalone /account/orders list -------------------------- */

/* Carry the dark canvas behind the public shell's breadcrumb band too. */
body.custom-content-page.public-reference-shell:has(.sv-order-list) {
  /* site-editorial.css pins the content-page canvas with !important. */
  background-color: oklch(0.16 0.02 50) !important;
}

.sv-order-list { color: var(--cd-text, oklch(0.93 0.028 85)); }

body.public-reference-shell .sv-order-list {
  background: oklch(0.16 0.02 50);
  border-radius: 8px;
  margin: 24px 0;
  padding: clamp(20px, 3vw, 36px);
}

body.public-reference-shell .sv-order-list h1,
body.public-reference-shell .sv-order-list h2 {
  color: oklch(0.93 0.028 85);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
}

body.public-reference-shell .sv-order-list h1 {
  font-size: clamp(42px, 5vw, 60px);
  line-height: 1.04;
  margin: 0 0 10px;
}

body.public-reference-shell .sv-order-list h2 { font-size: 30px; }

body.public-reference-shell .sv-order-list article {
  background: oklch(0.2 0.02 50);
  border-color: oklch(0.32 0.04 68);
  border-radius: 8px;
}

body.public-reference-shell .sv-order-list p,
body.public-reference-shell .sv-order-list li { color: oklch(0.78 0.03 80); }

body.public-reference-shell .sv-order-list a { color: oklch(0.8 0.11 82); }

body.public-reference-shell .sv-order-list button {
  background: oklch(0.23 0.022 52);
  border: 1px solid oklch(0.32 0.04 68);
  border-radius: 6px;
  color: oklch(0.93 0.028 85);
  cursor: pointer;
}

body.public-reference-shell .sv-order-list button:hover { border-color: oklch(0.8 0.11 82); }

body.public-reference-shell .sv-order-list [role="status"] { color: oklch(0.66 0.035 76); }

/* ---------- Responsive ------------------------------------------------ */

@media (width <= 1100px) {
  body.customer-account-page:not(.auth-reference) .cd-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
  }
  body.customer-account-page:not(.auth-reference) .cd-sidebar,
  body.customer-account-page:not(.auth-reference) .cd-content { min-width: 0; }
  body.customer-account-page:not(.auth-reference) .cd-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--cd-line-soft);
    padding: 0 0 16px;
    position: static;
  }
  body.customer-account-page:not(.auth-reference) .cd-sidebar-identity { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-sidebar > .cd-eyebrow { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-nav {
    flex-direction: row;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  body.customer-account-page:not(.auth-reference) .cd-nav::-webkit-scrollbar { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-nav a {
    border-left: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    flex-shrink: 0;
    min-height: 40px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  body.customer-account-page:not(.auth-reference) .cd-nav a[aria-current="page"] {
    border-bottom-color: var(--cd-gold);
  }
  body.customer-account-page:not(.auth-reference) .cd-profile-grid { grid-template-columns: 1fr; }
  body.customer-account-page:not(.auth-reference) .cd-security-grid { grid-template-columns: 1fr; }
  body.customer-account-page:not(.auth-reference) .cd-topbar { align-items: flex-start; }
  body.customer-account-page:not(.auth-reference) .cd-topbar-actions { width: 100%; }
}

@media (width <= 767px) {
  body.customer-account-page:not(.auth-reference) .cd-shell { padding-bottom: 64px; }
  body.customer-account-page:not(.auth-reference) .cd-profile-form { grid-template-columns: 1fr; }
  body.customer-account-page:not(.auth-reference) .cd-profile-form button[type="submit"] { grid-column: auto; }
  body.customer-account-page:not(.auth-reference) .cd-form-grid { grid-template-columns: 1fr; }
  body.customer-account-page:not(.auth-reference) .cd-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  body.customer-account-page:not(.auth-reference) .cd-stat { padding: 14px 16px; }
  body.customer-account-page:not(.auth-reference) .cd-photo-form { flex-direction: column; align-items: flex-start; }
  body.customer-account-page:not(.auth-reference) .cd-section-head { align-items: flex-start; flex-direction: column; }

  /* Enquiries become a single visible pane; the back button returns. */
  body.customer-account-page:not(.auth-reference) .cd-enquiries {
    grid-template-columns: minmax(0, 1fr);
    min-height: 62vh;
  }
  body.customer-account-page:not(.auth-reference) .cd-enq-divider { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-enq-list-pane { border-right: 0; }
  body.customer-account-page:not(.auth-reference) .cd-enq-back { display: inline-flex; }
  body.customer-account-page:not(.auth-reference) .cd-enquiries:not(.cd-thread-open) .cd-enq-thread { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-enquiries.cd-thread-open .cd-enq-list-pane { display: none; }
  body.customer-account-page:not(.auth-reference) .cd-enq-msg { max-width: 92%; }
  body.customer-account-page:not(.auth-reference) .cd-toolbar-select,
  body.customer-account-page:not(.auth-reference) .cd-toolbar-select select,
  body.customer-account-page:not(.auth-reference) .cd-view-toggle { width: 100%; }
  body.customer-account-page:not(.auth-reference) .cd-view-button { flex: 1; }
  body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  body.customer-account-page:not(.auth-reference) .customer-favorites-grid.is-list-view .customer-favorite-remove {
    grid-column: 2;
    margin: 0 14px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.customer-account-page:not(.auth-reference) *,
  .sv-order-list * {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- RTL ------------------------------------------------------- */

html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-nav a {
  border-left: 0;
  border-radius: 6px 0 0 6px;
  border-right: 2px solid transparent;
  margin-left: 0;
  margin-right: -1px;
}

html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-nav a[aria-current="page"] { border-right-color: var(--cd-gold); }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-enq-msg.cd-is-admin { align-self: flex-end; }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-enq-msg:not(.cd-is-admin) { align-self: flex-start; }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-enq-list-pane {
  border-left: 1px solid var(--cd-line-soft);
  border-right: 0;
}
/* Digits, ids and dates always read left to right, even in RTL chrome. */
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-stat-value,
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-order-id {
  direction: ltr;
  unicode-bidi: isolate;
}
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-nav-badge { margin-inline-start: auto; }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-attention-card { border-inline-start: 0; border-inline-end: 3px solid var(--cd-gold); }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-unread { border-inline-end-color: var(--cd-gold-light); }
html[dir="rtl"] body.customer-account-page:not(.auth-reference) .cd-attention-card.cd-attention-progress { border-inline-end-color: var(--cd-ok); }
