/* HAIDI Account — fullscreen auth overlay */

body.haidi-account-body {
  margin: 0;
  background: #f7f4ef;
}

body.haidi-account-body > *:not(.haidi-home):not(.select2-container) {
  display: none !important;
}

body.haidi-account-body--auth,
html:has(body.haidi-account-body--auth) {
  height: 100%;
  overflow: hidden;
}

body.haidi-account-body--auth[data-account-view='chooser'] {
  overflow: auto;
}

.haidi-account-page {
  --acc-paper: #f7f4ef;
  --acc-ink: var(--ink, #262019);
  --acc-muted: #8a8278;
  --acc-wine: var(--wine, #5d2434);
  --acc-line: rgba(38, 32, 25, 0.14);
  color: var(--acc-ink);
  font-family: var(--sans, 'Outfit', system-ui, sans-serif);
}

/* —— Logged-in shell (keeps site chrome) —— */
.haidi-account-page--member {
  min-height: 100vh;
  background: var(--acc-paper);
}

.haidi-account-page--member .haidi-account-main {
  padding-top: 61px;
}

/* Homepage section padding must not stretch dashboard blocks. */
.haidi-account-page.haidi-home .haidi-account-main section,
.haidi-account-page.haidi-home .haidi-dash section {
  padding: 0;
}

/* —— Member dashboard —— */
.haidi-dash {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 16px 56px;
}

/* Mobile: flatten side/main so sections can be reordered */
.haidi-dash-side,
.haidi-dash-main {
  display: contents;
}

.haidi-dash-profile-card { order: 1; }
.haidi-dash-welcome { order: 2; }
.haidi-dash-stats { order: 3; }
.haidi-dash-orders-head { order: 4; }
.haidi-dash-table-card { order: 4; }
.haidi-dash-row { order: 5; }
.haidi-dash-sidecard { order: 6; }
.haidi-dash-quiz { order: 7; }
.haidi-dash-features { order: 8; }

.haidi-dash-sidecard,
.haidi-dash-quiz,
.haidi-dash-orders,
.haidi-dash-stat,
.haidi-dash-placeholder,
.haidi-dash-profile-card {
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #fff;
}

.haidi-dash-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--acc-ink);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.haidi-dash-profile-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.haidi-dash-profile-info strong {
  font-size: 15px;
  font-weight: 600;
}

.haidi-dash-profile-info > span {
  color: var(--acc-muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.haidi-dash-profile-info em,
.haidi-dash-profile-info a {
  justify-self: start;
  color: var(--acc-ink);
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.haidi-dash-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #f1eadf;
  color: var(--acc-ink);
  text-decoration: none;
}

.haidi-dash-profile-card .haidi-dash-chevron {
  margin-left: auto;
}

.haidi-dash-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--acc-muted);
}

.haidi-dash-chevron svg {
  display: block;
  width: 18px;
  height: 18px;
}

.haidi-dash-welcome {
  margin: 10px 0 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* Stat cards */
.haidi-dash-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.haidi-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
}

.haidi-dash-stat:last-child {
  grid-column: 1 / -1;
}

.haidi-dash-stat-label {
  color: var(--acc-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.haidi-dash-stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
}

.haidi-dash-stat-value--text {
  font-size: 26px;
}

.haidi-dash-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  color: var(--acc-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.haidi-dash-link svg {
  display: block;
  width: 14px;
  height: 14px;
}

.haidi-dash-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Recent orders */
.haidi-dash-orders,
.haidi-dash-placeholder {
  padding: 18px 16px;
}

.haidi-dash-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.haidi-dash-card-head h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.haidi-dash-empty {
  margin: 14px 0 4px;
  color: var(--acc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.haidi-dash-empty a {
  color: var(--acc-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.haidi-dash-order-list {
  margin-top: 6px;
}

.haidi-dash-order {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-order:first-child {
  border-top: 0;
}

.haidi-dash-order-thumb {
  display: block;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  border-radius: 2px;
  overflow: hidden;
  background: #f1eadf;
}

.haidi-dash-order-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.haidi-dash-order-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.haidi-dash-order-info strong {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.haidi-dash-order-info > span {
  color: var(--acc-muted);
  font-size: 12px;
}

.haidi-dash-order-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  margin-left: auto;
  text-align: right;
}

.haidi-dash-order-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1eadf;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.haidi-dash-order-total {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.haidi-dash-order-btn {
  display: none;
  min-height: 40px;
  padding: 9px 18px;
}

.haidi-dash-order-chevron {
  flex: 0 0 auto;
}

/* Placeholder row */
.haidi-dash-row {
  display: grid;
  gap: 12px;
  align-items: start;
}

.haidi-dash-placeholder {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px 16px;
}

/* Sidebar card (nav) */
.haidi-dash-sidecard {
  padding: 12px 10px;
  background: #f1eadf;
}

.haidi-dash-sideprofile {
  display: none;
}

.haidi-dash-nav {
  display: flex;
  flex-direction: column;
}

.haidi-dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 2px;
  color: var(--acc-ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms ease;
}

.haidi-dash-nav a:hover {
  background: rgba(255, 255, 255, 0.6);
}

.haidi-dash-nav a.is-active {
  background: #fff;
  font-weight: 600;
}

.haidi-dash-nav-icon {
  display: inline-flex;
  flex: 0 0 auto;
}

.haidi-dash-nav-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* Quiz card */
.haidi-dash-quiz {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.haidi-dash-quiz-img {
  aspect-ratio: 16 / 9;
  background-color: #e5dccd;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.haidi-dash-quiz-body {
  display: grid;
  gap: 8px;
  padding: 18px 16px 20px;
  text-align: center;
}

.haidi-dash-quiz-body h3 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
}

.haidi-dash-quiz-body p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.haidi-dash-quiz-body .haidi-account-btn {
  margin-top: 6px;
  text-decoration: none;
}

/* "Jūsų užsakymai" heading row above the orders card */
.haidi-dash-orders-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}

.haidi-dash-orders-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Rewards & offers view */
.haidi-dash-rewards,
.haidi-dash-view {
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

/* Views manage their own heading position (cancel the mobile reorder). */
.haidi-dash-rewards .haidi-dash-welcome,
.haidi-dash-view .haidi-dash-welcome {
  order: 0;
  margin: 0;
}

.haidi-saved-head {
  display: grid;
  gap: 8px;
}

.haidi-saved-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.haidi-saved-title-icon {
  display: inline-flex;
  color: var(--acc-wine);
  flex: 0 0 auto;
}

.haidi-saved-title-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.haidi-saved-lead {
  margin: 0;
  color: var(--acc-muted);
  font-size: 15px;
  line-height: 1.5;
}

.haidi-saved-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

/* Mobile: cart-line layout */
.haidi-saved-grid .haidi-cat-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 28px;
  grid-template-rows: auto;
  gap: 12px;
  align-items: center;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--acc-line);
  background: transparent;
  overflow: visible;
}

.haidi-saved-grid .haidi-cat-media {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  width: 56px;
  aspect-ratio: 4 / 5;
  background: #f1eadf;
  overflow: hidden;
}

.haidi-saved-grid .haidi-cat-img,
.haidi-saved-grid .haidi-cat-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.haidi-saved-grid .haidi-cat-body {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.haidi-saved-grid .haidi-cat-name {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.haidi-saved-grid .haidi-cat-name a {
  color: inherit;
  text-decoration: none;
}

.haidi-saved-grid .haidi-cat-inspired {
  margin: 0;
  color: var(--acc-muted);
  font-size: 12px;
  line-height: 1.35;
}

.haidi-saved-grid .haidi-cat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1px;
  margin-top: 2px;
  font-size: 13px;
}

.haidi-saved-grid .haidi-cat-sep {
  display: none;
}

.haidi-saved-grid .haidi-cat-variant {
  color: var(--acc-muted);
  font-size: 12px;
}

.haidi-saved-grid .haidi-cat-price {
  font-weight: 500;
}

.haidi-saved-grid .haidi-cat-atc,
.haidi-saved-grid .haidi-save-heart {
  display: none !important;
}

.haidi-saved-grid .haidi-cat-card .added_to_cart,
.haidi-saved-grid .haidi-cat-card a.wc-forward {
  display: none !important;
}

.haidi-saved-grid .haidi-cat-go {
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: 28px;
  height: 28px;
  color: var(--acc-muted);
  text-decoration: none;
}

.haidi-saved-grid .haidi-cat-go svg {
  display: block;
  width: 18px;
  height: 18px;
}

.haidi-saved-quiz-tile {
  display: none;
}

.haidi-recent-empty {
  margin: 8px 0 0;
  color: var(--acc-muted);
  font-size: 15px;
  line-height: 1.55;
}

.haidi-recent-history {
  display: grid;
  gap: 28px;
}

.haidi-recent-day-label {
  margin: 0 0 10px;
  color: var(--acc-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.haidi-recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--acc-line);
}

.haidi-recent-list li {
  margin: 0;
  padding: 0;
}

.haidi-recent-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto 18px;
  gap: 14px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--acc-line);
  color: inherit;
  text-decoration: none;
  transition: background 160ms ease;
}

.haidi-recent-thumb {
  display: block;
  width: 48px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f1eadf;
}

.haidi-recent-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.haidi-recent-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.haidi-recent-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.haidi-recent-sub {
  color: var(--acc-muted);
  font-size: 12px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.haidi-recent-time {
  color: var(--acc-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.haidi-recent-arrow {
  display: inline-flex;
  color: var(--acc-muted);
}

.haidi-recent-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* Sub-pages: profile sits above the nav (Suvestinė), not at the top. */
.haidi-dash--subview .haidi-dash-profile-card {
  order: 6;
}

.haidi-dash--subview .haidi-dash-sidecard {
  order: 7;
}

.haidi-dash--saved .haidi-dash-quiz {
  order: 5;
}

.haidi-dash--saved .haidi-dash-sidecard {
  order: 7;
}

.haidi-dash--details .haidi-details-form {
  display: grid;
  gap: 14px;
}

.haidi-details-card {
  display: grid;
  gap: 14px;
}

.haidi-details-card .haidi-dash-rw-title {
  margin-bottom: 2px;
}

.haidi-details-hint {
  margin: -4px 0 0;
  color: var(--acc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.haidi-dash-details .haidi-account-input {
  border-radius: 2px;
}

.haidi-dash-details .haidi-account-error,
.haidi-dash-details .haidi-account-success {
  border-radius: 2px;
}

.haidi-account-success {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(45, 106, 79, 0.22);
  background: #f3faf6;
  color: #1e5c40;
  font-size: 12px;
  line-height: 1.45;
}

.haidi-account-success[hidden] {
  display: none !important;
}

.haidi-details-actions {
  display: grid;
  gap: 12px;
  justify-items: stretch;
}

.haidi-details-actions .haidi-account-btn {
  width: 100%;
}

@media (max-width: 639px) {
  .haidi-dash-details .haidi-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .haidi-details-actions {
    justify-items: start;
  }

  .haidi-details-actions .haidi-account-btn {
    width: auto;
    min-width: 220px;
  }

  .haidi-dash--details .haidi-details-form {
    gap: 18px;
  }

  .haidi-details-card {
    padding: 22px;
  }
}

/* Orders list */
.haidi-dash-tabs {
  display: flex;
  border-bottom: 1px solid var(--acc-line);
  overflow-x: auto;
  scrollbar-width: none;
}

.haidi-dash-tabs::-webkit-scrollbar {
  display: none;
}

.haidi-dash-tabs a {
  flex: 1 0 auto;
  margin-bottom: -1px;
  padding: 11px 12px;
  border-bottom: 2px solid transparent;
  color: var(--acc-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: color 140ms ease, border-color 140ms ease;
}

.haidi-dash-tabs a.is-active {
  border-bottom-color: var(--acc-ink);
  color: var(--acc-ink);
  font-weight: 600;
}

.haidi-dash-table-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0;
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #fff;
  overflow: hidden;
}

.haidi-dash-table-card .haidi-dash-empty {
  margin: 0;
  padding: 18px 16px;
}

.haidi-dash-table-card .haidi-dash-table {
  margin-top: 8px;
}

.haidi-dash-table[hidden],
.haidi-dash .haidi-dash-trow[hidden] {
  display: none !important;
}

.haidi-dash-trow.is-first {
  border-top: 0;
}

/* Pagination at the bottom of the orders card */
.haidi-dash-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-pager a,
.haidi-dash-pager button,
.haidi-dash-pager .is-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 2px;
  background: none;
  color: var(--acc-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.haidi-dash-pager a:hover,
.haidi-dash-pager button:hover {
  color: var(--acc-ink);
}

.haidi-dash-pager .is-current {
  background: var(--acc-ink);
  color: #fff;
}

.haidi-dash-pager-arrow svg {
  display: block;
  width: 15px;
  height: 15px;
}

.haidi-dash-pager-arrow--prev svg {
  transform: scaleX(-1);
}

.haidi-dash-thead {
  display: none;
}

.haidi-dash .haidi-dash-trow {
  display: grid;
  grid-template-areas:
    'nr     status action'
    'date   total  action';
  grid-template-columns: 1fr auto 34px;
  align-items: center;
  gap: 2px 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-tcell--nr {
  grid-area: nr;
  font-size: 13px;
  font-weight: 600;
}

.haidi-dash-tcell--date {
  grid-area: date;
  color: var(--acc-muted);
  font-size: 12px;
}

.haidi-dash-tcell--status {
  grid-area: status;
  justify-self: end;
}

.haidi-dash-tcell--total {
  grid-area: total;
  justify-self: end;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.haidi-dash-tcell--action {
  grid-area: action;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.haidi-dash-tlink {
  display: none;
  color: var(--acc-ink);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.haidi-dash-tlink:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.haidi-dash-contact-note {
  margin: 2px 0 0;
  color: var(--acc-muted);
  font-size: 13px;
}

.haidi-dash-contact-note a {
  color: var(--acc-ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Single order view */
.haidi-dash-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  color: var(--acc-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.haidi-dash-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.haidi-dash-back svg {
  display: block;
  width: 16px;
  height: 16px;
}

.haidi-dash-ohead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.haidi-dash-ohead-date {
  margin: 6px 0 0;
  color: var(--acc-muted);
  font-size: 13px;
}

.haidi-dash-ohead-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.haidi-dash-invoice-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--acc-ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.haidi-dash-invoice-link svg {
  width: 15px;
  height: 15px;
}

.haidi-dash-ocols {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #fff;
}

.haidi-dash-ocol {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-ocol:first-child {
  border-top: 0;
}

.haidi-dash-ocol-value {
  font-size: 13px;
  font-weight: 600;
}

/* Status tracker (no card chrome) */
.haidi-dash-tracker-card {
  padding: 12px 0 4px;
}

.haidi-dash-tracker-card .haidi-dash-empty {
  margin: 0;
}

.haidi-dash-tracker {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.haidi-dash-tracker-step {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.haidi-dash-tracker-step::before {
  position: absolute;
  top: 19px;
  right: calc(50% + 24px);
  left: calc(-50% + 24px);
  height: 1px;
  background: var(--acc-line);
  content: '';
}

.haidi-dash-tracker-step:first-child::before {
  display: none;
}

.haidi-dash-tracker-step.is-done::before,
.haidi-dash-tracker-step.is-current::before {
  background: var(--acc-ink);
}

.haidi-dash-tracker-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--acc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--acc-muted);
}

.haidi-dash-tracker-step.is-done .haidi-dash-tracker-icon,
.haidi-dash-tracker-step.is-current .haidi-dash-tracker-icon {
  border-color: var(--acc-ink);
  background: var(--acc-ink);
  color: #fff;
}

.haidi-dash-tracker-icon svg {
  display: block;
  width: 17px;
  height: 17px;
}

.haidi-dash-tracker-label {
  color: var(--acc-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
}

.haidi-dash-tracker-step.is-done .haidi-dash-tracker-label,
.haidi-dash-tracker-step.is-current .haidi-dash-tracker-label {
  color: var(--acc-ink);
}

/* Order detail cards */
.haidi-dash-ogrid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.haidi-dash-ogrid-left,
.haidi-dash-ogrid-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.haidi-dash-ocard {
  padding: 18px 16px;
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #fff;
}

.haidi-dash-oitems {
  margin-top: 6px;
}

.haidi-dash-oitem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-oitem:first-child {
  border-top: 0;
}

.haidi-dash-oitem-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.haidi-dash-oitem-info strong {
  font-size: 13px;
  font-weight: 600;
}

.haidi-dash-oitem-info > span {
  color: var(--acc-muted);
  font-size: 12px;
}

.haidi-dash-oitem-price {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.haidi-dash-olist {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
}

.haidi-dash-olist > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.haidi-dash-olist dt {
  color: var(--acc-muted);
  font-size: 12px;
}

.haidi-dash-olist dd {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.haidi-dash-olist-total {
  padding-top: 10px;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-olist-total dt,
.haidi-dash-olist-total dd {
  color: var(--acc-ink);
  font-weight: 700;
}

.haidi-dash-rw-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.haidi-dash-rw-card {
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #fff;
  padding: 20px 16px;
}

.haidi-dash-rw-title {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.haidi-dash-rw-steps {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.haidi-dash-rw-step h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
}

.haidi-dash-rw-step p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 13px;
  line-height: 1.5;
}

.haidi-dash-rw-center {
  margin: 18px 0 0;
  text-align: center;
}

.haidi-dash-rw-center .haidi-dash-link {
  margin-top: 0;
}

.haidi-dash-rw-divider {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--acc-line);
}

.haidi-dash-rw-coupons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.haidi-dash-coupon {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed #c9c1b4;
  border-radius: 2px;
  background: #faf7f1;
}

.haidi-dash-coupon-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.haidi-dash-coupon-code {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.haidi-dash-coupon-exp {
  color: var(--acc-muted);
  font-size: 11px;
}

.haidi-dash-rw-more {
  margin: 10px 0 0;
  color: var(--acc-muted);
  font-size: 12px;
  font-weight: 600;
}

.haidi-dash-rw-offers {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.haidi-dash-offer {
  padding: 16px 14px;
  border: 1px solid var(--acc-line);
  border-radius: 2px;
  background: #faf7f1;
}

.haidi-dash-offer h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 600;
}

.haidi-dash-offer p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 12px;
  line-height: 1.5;
}

/* Feature strip */
.haidi-dash-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 12px;
  padding: 14px 4px 0;
}

.haidi-dash-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.haidi-dash-feature h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.haidi-dash-feature p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* —— Auth fullscreen —— */
.haidi-account-page--auth {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: 100%;
  min-height: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

body.haidi-account-body--auth[data-account-view='form'] .haidi-account-page--auth {
  overflow: hidden;
  height: 100%;
}

.haidi-account.is-auth,
.haidi-account-auth {
  width: 100%;
  height: 100%;
}

.haidi-account-auth {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.haidi-account-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--acc-ink);
  border-radius: 50%;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.haidi-account-exit svg {
  display: block;
  width: 22px;
  height: 22px;
}

.haidi-account-exit--float {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 6;
}

.haidi-account[data-view='form'] .haidi-account-exit--float {
  display: none;
}

.haidi-account-visuals {
  position: relative;
  flex: 1 1 auto;
  min-height: 52vh;
  overflow: hidden;
}

.haidi-account-panel {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  padding: 28px 22px 24px;
  background-color: #d9d0c4;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #1f1a15;
}

.haidi-account-panel.is-active {
  display: flex;
  animation: haidiAccountFade 420ms ease;
}

.haidi-account-panel[hidden] {
  display: none !important;
}

.haidi-account-panel-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(247, 244, 239, 0.18) 0%, rgba(247, 244, 239, 0) 34%, rgba(20, 16, 12, 0.08) 100%);
  pointer-events: none;
}

.haidi-account-panel-top,
.haidi-account-panel-mid,
.haidi-account-features {
  position: relative;
  z-index: 1;
}

.haidi-account-panel-top {
  flex: 0 0 auto;
  padding-top: 40px;
}

.haidi-account-panel-title {
  margin: 0 0 10px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(40px, 11vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.98;
}

.haidi-account-panel-text {
  max-width: 280px;
  margin: 0;
  color: rgba(31, 26, 21, 0.78);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
}

.haidi-account-panel-mid {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
  padding-top: 18px;
}

.haidi-account-features {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.haidi-account-features li {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
}

.haidi-account-features li + li::before {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 0;
  width: 1px;
  background: rgba(31, 26, 21, 0.22);
  content: '';
}

.haidi-account-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(31, 26, 21, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: var(--acc-ink);
}

.haidi-account-feature-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.haidi-account-side {
  flex: 0 0 auto;
  background: #fff;
}

.haidi-account-mobile-chooser {
  display: grid;
  gap: 10px;
  padding: 18px 18px 28px;
}

.haidi-account[data-view='form'] .haidi-account-visuals,
.haidi-account[data-view='form'] .haidi-account-mobile-chooser {
  display: none;
}

.haidi-account[data-view='chooser'] .haidi-account-forms {
  display: none;
}

.haidi-account-forms {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
  background: #fff;
}

.haidi-account[data-view='form'] .haidi-account-side,
.haidi-account[data-view='form'] .haidi-account-forms {
  height: 100%;
  min-height: 100%;
}

.haidi-account[data-view='form'] .haidi-account-form-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.haidi-account-form-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  flex: 0 0 auto;
  min-height: 58px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--acc-line);
  background: #fff;
}

.haidi-account-bar-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  appearance: none;
  border: 0;
  background: none;
  color: var(--acc-ink);
  cursor: pointer;
}

.haidi-account-bar-btn svg {
  display: block;
  width: 22px;
  height: 22px;
}

.haidi-account-bar-spacer {
  width: 44px;
  height: 44px;
}

.haidi-account-bar-logo {
  display: flex;
  justify-content: center;
}

.haidi-account-bar-logo .logo {
  color: var(--acc-ink);
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.haidi-account-bar-logo .haidi-logo-img {
  display: block;
  max-height: 26px;
  width: auto;
}

.haidi-account-form-panel {
  flex: 1;
  padding: 28px 22px 36px;
  animation: haidiAccountFade 380ms ease;
}

.haidi-account-form-panel[hidden] {
  display: none !important;
}

@keyframes haidiAccountFade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.haidi-account-form-head {
  margin: 0 0 28px;
}

.haidi-account-form-head h1 {
  margin: 0 0 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(34px, 9vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.haidi-account-form-head p {
  margin: 0;
  color: var(--acc-muted);
  font-size: 13px;
  line-height: 1.45;
}

.haidi-account-switch {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--acc-ink);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.haidi-account-form {
  display: grid;
  gap: 14px;
}

.haidi-account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.haidi-account-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.haidi-account-label {
  color: var(--acc-muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.haidi-account-input {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid #d6d0c7;
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--acc-ink);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.haidi-account-password-wrap {
  position: relative;
  display: block;
}

.haidi-account-password-wrap .haidi-account-input {
  padding-right: 48px;
}

.haidi-account-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--acc-muted);
  transform: translateY(-50%);
  cursor: pointer;
}

.haidi-account-password-toggle:hover,
.haidi-account-password-toggle:focus-visible {
  color: var(--acc-ink);
}

.haidi-account-password-toggle svg {
  display: none;
  width: 20px;
  height: 20px;
}

.haidi-account-password-toggle .haidi-account-eye-open {
  display: block;
}

.haidi-account-password-toggle.is-visible .haidi-account-eye-open {
  display: none;
}

.haidi-account-password-toggle.is-visible .haidi-account-eye-closed {
  display: block;
}

.haidi-account-input:focus {
  border-color: var(--acc-ink);
  box-shadow: 0 0 0 3px rgba(38, 32, 25, 0.06);
}

.haidi-account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.haidi-account-check {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--acc-ink);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
}

.haidi-account-check input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--acc-ink);
}

.haidi-account-forgot,
.haidi-account-policy-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: none;
  color: var(--acc-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.haidi-account-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: -2px 0 2px;
  padding: 0;
  list-style: none;
}

.haidi-account-rules li {
  position: relative;
  padding-left: 16px;
  color: var(--acc-muted);
  font-size: 11px;
  font-weight: 500;
}

.haidi-account-rules li::before {
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 10px;
  height: 10px;
  border: 1px solid #c7c0b8;
  border-radius: 50%;
  content: '';
}

.haidi-account-rules li.is-met {
  color: #2d6a4f;
}

.haidi-account-rules li.is-met::before {
  border-color: #2d6a4f;
  background: #2d6a4f;
  box-shadow: inset 0 0 0 2px #fff;
}

.haidi-account-error {
  margin: 0;
  padding: 11px 13px;
  border: 1px solid rgba(168, 56, 56, 0.18);
  border-radius: 10px;
  background: #fff7f7;
  color: #993333;
  font-size: 12px;
  line-height: 1.45;
}

.haidi-account-error[hidden] {
  display: none !important;
}

.haidi-account-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 13px 24px;
  appearance: none;
  border: 1px solid var(--acc-ink);
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.haidi-account-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.haidi-account-btn--primary {
  background: var(--acc-ink);
  color: #fff !important;
}

.haidi-account-btn--ghost {
  background: #fff;
  color: var(--acc-ink);
}

.haidi-account-btn--block {
  width: 100%;
  margin-top: 4px;
}

.haidi-account-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

.haidi-account-secure {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 10px 0 0;
  color: var(--acc-muted);
  font-size: 11px;
  line-height: 1.4;
  text-align: center;
}

.haidi-account-secure svg {
  display: block;
  width: 14px;
  height: 14px;
  color: var(--acc-ink);
}

/* Policy modals */
body.haidi-account-modal-open,
html:has(body.haidi-account-modal-open) {
  overflow: hidden !important;
}

.haidi-account-policy-modal[hidden] {
  display: none !important;
}

.haidi-account-policy-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  align-items: end;
  padding: 14px;
  background: rgba(25, 21, 17, 0.54);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.haidi-account-policy-dialog {
  display: flex;
  flex-direction: column;
  width: min(100%, 760px);
  max-height: calc(100vh - 28px);
  margin: 0 auto;
  overflow: hidden;
  outline: none;
  background: #fff;
  border-radius: 16px 16px 0 0;
}

.haidi-account-policy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
  padding: 16px 18px 16px 22px;
  border-bottom: 1px solid var(--acc-line);
}

.haidi-account-policy-header h2 {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
}

.haidi-account-policy-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  appearance: none;
  border: 1px solid var(--acc-line);
  border-radius: 50%;
  background: #fff;
  color: var(--acc-ink);
  font-size: 22px;
  cursor: pointer;
}

.haidi-account-policy-content {
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
  color: #4f4941;
  font-size: 13px;
  line-height: 1.65;
}

.haidi-account-policy-content a {
  color: var(--acc-wine);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* —— Desktop: fixed 50/50 fullscreen —— */
@media (min-width: 900px) {
  body.haidi-account-body--auth,
  body.haidi-account-body--auth[data-account-view='chooser'],
  html:has(body.haidi-account-body--auth) {
    overflow: hidden;
  }

  .haidi-account-page--auth,
  body.haidi-account-body--auth[data-account-view='form'] .haidi-account-page--auth {
    overflow: hidden;
    height: 100%;
  }

  .haidi-account-auth {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    min-height: 100%;
  }

  .haidi-account-visuals {
    position: relative;
    flex: none;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }

  .haidi-account-panel {
    position: absolute;
    inset: 0;
    height: 100%;
    padding: 48px 44px 40px;
    /* Image panel never scrolls */
    overflow: hidden;
  }

  .haidi-account-exit--float {
    top: 28px;
    left: calc(50% + 28px);
    display: inline-flex;
    background: transparent;
  }

  .haidi-account[data-view='form'] .haidi-account-exit--float {
    display: inline-flex;
  }

  .haidi-account-panel-top {
    padding-top: 8px;
  }

  .haidi-account-panel-title {
    font-size: clamp(48px, 5vw, 64px);
  }

  .haidi-account-panel-text {
    max-width: 340px;
    font-size: 14px;
  }

  .haidi-account-panel-mid {
    padding-top: 24px;
  }

  .haidi-account-features {
    max-width: 560px;
  }

  .haidi-account-features li {
    padding: 0 18px;
    font-size: 12px;
  }

  .haidi-account-feature-icon {
    width: 40px;
    height: 40px;
  }

  .haidi-account-feature-icon svg {
    width: 18px;
    height: 18px;
  }

  .haidi-account-side {
    position: relative;
    display: flex;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background: #fff;
  }

  .haidi-account-mobile-chooser,
  .haidi-account-form-bar {
    display: none !important;
  }

  .haidi-account[data-view='chooser'] .haidi-account-forms,
  .haidi-account[data-view='form'] .haidi-account-forms,
  .haidi-account[data-view='form'] .haidi-account-visuals,
  .haidi-account[data-view='chooser'] .haidi-account-visuals {
    display: flex;
  }

  .haidi-account-forms {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding: 72px clamp(36px, 5vw, 72px) 48px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .haidi-account-form-panel {
    width: 100%;
    max-width: 420px;
    padding: 0;
  }

  .haidi-account-btn {
    border-radius: 8px;
  }

  .haidi-account-input {
    border-radius: 8px;
  }

  .haidi-account-policy-modal {
    align-items: center;
    padding: 24px;
  }

  .haidi-account-policy-dialog {
    border-radius: 16px;
    max-height: calc(100vh - 48px);
  }

  /* Member dashboard — sidebar + main columns */
  .haidi-dash {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: stretch;
    gap: 20px;
    padding: 36px 24px 64px;
  }

  .haidi-dash-profile-card {
    display: none;
  }

  .haidi-dash-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
    grid-row: 1;
    grid-column: 1;
    min-width: 0;
  }

  .haidi-dash-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    grid-row: 1;
    grid-column: 2;
    min-width: 0;
  }

  .haidi-dash-features {
    grid-row: 2;
    grid-column: 1 / -1;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding-top: 16px;
  }

  .haidi-dash-sidecard {
    flex: 1 1 auto;
    padding: 20px 14px;
  }

  /* Sub-views (orders, single order, rewards): don't stretch the sidebar
     to match tall content — keep it at its natural height. */
  .haidi-dash--subview {
    align-items: start;
  }

  .haidi-dash--subview .haidi-dash-side {
    height: auto;
  }

  .haidi-dash--subview .haidi-dash-sidecard {
    flex: 0 0 auto;
  }

  .haidi-dash-sideprofile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--acc-line);
    margin-bottom: 12px;
  }

  .haidi-dash-welcome {
    margin: 0;
  }

  .haidi-dash-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .haidi-dash-stat {
    padding: 20px;
  }

  .haidi-dash-stat:last-child {
    grid-column: auto;
  }

  .haidi-dash-orders,
  .haidi-dash-placeholder {
    padding: 22px 22px 20px;
  }

  .haidi-dash-row {
    flex: 0 0 auto;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .haidi-dash-order {
    gap: 16px;
  }

  .haidi-dash-order-meta {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }

  .haidi-dash-order-btn {
    display: inline-flex;
  }

  .haidi-dash-order-chevron {
    display: none;
  }

  /* Rewards view */
  .haidi-dash-rewards,
  .haidi-dash-view {
    gap: 20px;
  }

  .haidi-saved-title-icon svg {
    width: 32px;
    height: 32px;
  }

  .haidi-saved-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 16px;
  }

  .haidi-saved-grid .haidi-cat-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 0;
    align-items: stretch;
    padding: 0;
    border: 1px solid var(--acc-line);
    background: #fff;
    overflow: hidden;
  }

  .haidi-saved-grid .haidi-cat-media {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    aspect-ratio: 4 / 5;
  }

  .haidi-saved-grid .haidi-cat-body {
    grid-column: 1;
    grid-row: 2;
    padding: 14px 12px 16px;
    text-align: center;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
  }

  .haidi-saved-grid .haidi-cat-name {
    font-size: 15px;
  }

  .haidi-saved-grid .haidi-cat-meta {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px 8px;
    margin-top: 8px;
  }

  .haidi-saved-grid .haidi-cat-sep {
    display: block;
    width: 1px;
    height: 11px;
    background: var(--acc-line);
  }

  .haidi-saved-grid .haidi-cat-variant {
    color: inherit;
    font-size: inherit;
  }

  .haidi-saved-grid .haidi-cat-atc {
    display: grid !important;
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    margin: 0 10px 10px 0;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: var(--acc-ink);
    place-items: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(20, 17, 12, 0.1);
  }

  .haidi-saved-grid .haidi-cat-atc svg {
    width: 18px;
    height: 18px;
  }

  .haidi-saved-grid .haidi-save-heart {
    display: inline-flex !important;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 10px rgba(20, 17, 12, 0.1);
  }

  .haidi-saved-grid .haidi-cat-go {
    display: none !important;
  }

  .haidi-saved-quiz-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    min-height: 100%;
    padding: 28px 24px;
    background: var(--acc-wine);
    color: #f6efe9;
    box-sizing: border-box;
  }

  .haidi-saved-quiz-tile[data-span="3"],
  .haidi-saved-quiz-tile[data-span="4"] {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 0;
    padding: 36px 40px;
  }

  .haidi-saved-quiz-copy {
    display: grid;
    gap: 8px;
    max-width: 420px;
  }

  .haidi-saved-quiz-tile h2 {
    margin: 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(22px, 2.1vw, 30px);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.15;
    color: inherit;
  }

  .haidi-saved-quiz-tile p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(246, 239, 233, 0.78);
  }

  .haidi-saved-quiz-btn {
    flex: 0 0 auto;
    background: #f6efe9 !important;
    color: var(--acc-wine) !important;
  }

  .haidi-dash--saved .haidi-dash-quiz {
    display: none;
  }

  .haidi-recent-row {
    padding: 14px 8px;
    margin: 0 -8px;
  }

  .haidi-recent-row:hover {
    background: rgba(255, 255, 255, 0.55);
  }

  .haidi-recent-thumb {
    width: 52px;
  }

  .haidi-recent-name {
    font-size: 16px;
  }

  /* Orders list — full table layout */
  .haidi-dash-table-card .haidi-dash-empty {
    padding: 20px 24px;
  }

  .haidi-dash-pager {
    padding: 12px 24px;
  }

  .haidi-dash-thead,
  .haidi-dash .haidi-dash-trow {
    display: grid;
    grid-template-areas: none;
    grid-template-columns: 1.1fr 1fr 1.4fr 0.9fr 72px;
    align-items: center;
    gap: 16px;
  }

  .haidi-dash-thead {
    padding: 18px 24px 12px;
    border-bottom: 1px solid var(--acc-line);
    color: var(--acc-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .haidi-dash .haidi-dash-trow {
    padding: 16px 24px;
  }

  .haidi-dash-tcell--nr,
  .haidi-dash-tcell--date,
  .haidi-dash-tcell--status,
  .haidi-dash-tcell--total,
  .haidi-dash-tcell--action {
    grid-area: auto;
    justify-self: start;
  }

  .haidi-dash-tcell--action {
    justify-self: end;
  }

  .haidi-dash-tlink {
    display: inline-block;
  }

  /* Single order */
  .haidi-dash-ohead-side {
    align-items: flex-end;
  }

  .haidi-dash-ocols {
    grid-template-columns: repeat(3, 1fr);
  }

  .haidi-dash-ocol {
    padding: 12px 18px;
    border-top: 0;
    border-left: 1px solid var(--acc-line);
  }

  .haidi-dash-ocol:first-child {
    border-left: 0;
  }

  .haidi-dash-tracker-card {
    padding: 16px 0 6px;
  }

  .haidi-dash-tracker-label {
    font-size: 11px;
  }

  .haidi-dash-ogrid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    align-items: start;
    gap: 20px;
  }

  .haidi-dash-ogrid-left,
  .haidi-dash-ogrid-right {
    gap: 20px;
  }

  .haidi-dash-ocard {
    padding: 22px;
  }

  .haidi-dash-rw-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .haidi-dash-rw-card {
    padding: 26px 24px;
  }

  .haidi-dash-rw-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .haidi-dash-rw-coupons {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .haidi-dash-rw-offers {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .haidi-account-panel,
  .haidi-account-form-panel,
  .haidi-account-btn {
    transition: none !important;
    animation: none !important;
  }
}
