.account-clinic-page,
.account-notifications-page,
.account-notification-settings,
.notification-sidebar {
  color: var(--text);
}

.account-clinic-page .table-responsive,
.account-clinic-page .clinic-request-card,
.account-notifications-page .notifications-inbox-card,
.account-notification-settings {
  background: var(--surface-primary);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  color: var(--text);
  box-shadow: var(--card-shadow);
}

.account-clinic-page .table-responsive {
  overflow: hidden;
}

.account-clinic-page table.history-table,
.account-notifications-page .list-group-item,
.account-notification-settings .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border-muted);
  color: var(--text);
}

.account-clinic-page table.history-table thead th,
.account-notification-settings .table thead th {
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-secondary);
}

.account-clinic-page table.history-table tbody td,
.account-notification-settings .table tbody td {
  background: transparent;
  border-bottom: 1px solid var(--border-muted);
  color: var(--text-secondary);
}

.account-clinic-page table.history-table tbody tr:last-child td,
.account-notification-settings .table tbody tr:last-child td {
  border-bottom: 0;
}

.account-clinic-page a:not(.btn):not(.account-button),
.account-notifications-page a:not(.btn) {
  color: var(--accent);
}

.account-clinic-page a.account-button--primary {
  color: #07140d;
}

.account-clinic-page .clinic-request-card dt {
  color: var(--text);
}

.account-clinic-page .clinic-request-card dd {
  color: var(--text-secondary);
}

.account-clinic-page .clinic-status-badge,
.account-notification-settings .notification-required-badge {
  background: var(--surface-strong);
  border: 1px solid var(--border-soft);
  color: var(--text-secondary);
}

.account-clinic-page .clinic-back-link {
  color: var(--accent);
  text-decoration: none;
}

.account-notifications-page .notifications-inbox-card {
  overflow: hidden;
}

.account-notifications-page .notifications-inbox-list {
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  overflow: hidden;
}

.account-notifications-page .list-group-item {
  background: var(--surface-primary);
  border-color: var(--border-muted);
  padding: 14px 16px;
  text-decoration: none;
}

.account-notifications-page .list-group-item:hover,
.account-notifications-page .list-group-item:focus-visible {
  background: var(--surface-secondary);
  color: var(--text);
}

.account-notifications-page .list-group-item.is-unread {
  position: relative;
  padding-inline-end: 38px;
}

.account-notifications-page .list-group-item.is-unread::after {
  width: 8px;
  height: 8px;
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 17px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  content: "";
}

.account-notifications-page .text-muted,
.account-notification-settings .text-muted {
  color: var(--muted) !important;
}

.account-notification-settings {
  scroll-margin-top: calc(var(--header-h, 72px) + 20px);
}

.account-notification-settings:target,
.account-notification-settings:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--border-muted));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  outline: 0;
}

.account-notification-settings .form-check-input {
  background-color: var(--surface-secondary);
  border-color: var(--border-soft);
}

.account-notification-settings .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.account-notification-settings .form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.account-notification-settings .form-check-input:disabled {
  opacity: .55;
}

.account-clinic-page .btn-dark,
.account-clinic-page .btn-outline-dark,
.account-notifications-page .btn-dark,
.account-notifications-page .btn-outline-dark,
.account-notification-settings .btn-dark,
.account-notification-settings .btn-outline-dark,
.notification-sidebar .btn-dark,
.notification-sidebar .btn-outline-dark {
  --bs-btn-color: var(--bg);
  --bs-btn-bg: var(--text);
  --bs-btn-border-color: var(--text);
  --bs-btn-hover-color: var(--bg);
  --bs-btn-hover-bg: var(--text-secondary);
  --bs-btn-hover-border-color: var(--text-secondary);
}

.account-clinic-page .btn-outline-dark,
.account-notifications-page .btn-outline-dark,
.account-notification-settings .btn-outline-dark,
.notification-sidebar .btn-outline-dark {
  --bs-btn-color: var(--text);
  --bs-btn-bg: transparent;
  --bs-btn-hover-color: var(--bg);
  --bs-btn-hover-bg: var(--text);
}

.notification-nav-action {
  position: relative;
}

.notification-count-badge {
  align-items: center;
  background: #dc3545;
  border: 2px solid var(--bg);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 19px;
  inset-block-start: -6px;
  inset-inline-end: -7px;
  justify-content: center;
  min-width: 19px;
  padding: 0 4px;
  position: absolute;
}

.notification-sidebar {
  --bs-offcanvas-width: min(430px, 100vw);
  background: var(--surface-primary);
  border-color: var(--border-muted);
  color: var(--text);
}

.notification-sidebar__header {
  border-bottom: 1px solid var(--border-muted);
  padding: 20px 22px 16px;
}

.notification-sidebar__eyebrow {
  color: var(--accent);
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.notification-sidebar__toolbar {
  align-items: center;
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border-muted);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  justify-content: space-between;
  padding: 10px 22px;
}

.notification-sidebar__mark-all {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 4px;
}

.notification-sidebar__mark-all:disabled {
  color: var(--muted);
  cursor: default;
  opacity: .65;
}

.notification-sidebar__body {
  padding: 0;
}

.notification-sidebar__list {
  display: grid;
}

.notification-sidebar__item {
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border-muted);
  color: var(--text);
  display: grid;
  gap: 6px;
  padding: 15px 22px;
  text-decoration: none;
  transition: background-color .2s ease;
}

.notification-sidebar__item:hover,
.notification-sidebar__item:focus-visible {
  background: var(--surface-secondary);
  color: var(--text);
}

.notification-sidebar__item.is-unread {
  position: relative;
  padding-inline-end: 36px;
}

.notification-sidebar__item.is-unread::after {
  width: 8px;
  height: 8px;
  position: absolute;
  inset-block-start: 18px;
  inset-inline-end: 17px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  content: "";
}

.notification-sidebar__item-heading {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.notification-sidebar__item-heading strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.35;
}

.notification-sidebar__item-heading time {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
}

.notification-sidebar__item-message {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.notification-sidebar__state {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 220px;
  padding: 28px;
  text-align: center;
}

.notification-sidebar__footer {
  align-items: center;
  background: var(--surface-primary);
  border-top: 1px solid var(--border-muted);
  display: flex;
  gap: 12px;
  justify-content: center;
  padding: 16px 22px max(16px, env(safe-area-inset-bottom));
}

.notification-sidebar__action {
  align-items: center;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  color: var(--text);
  display: inline-flex;
  font-size: 17px;
  height: 44px;
  justify-content: center;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
  width: 44px;
}

.notification-sidebar__action--primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.notification-sidebar__action:hover,
.notification-sidebar__action:focus-visible {
  background: var(--surface-strong);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.notification-sidebar__action:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
  outline: 0;
}

[data-theme="dark"] .notification-sidebar .btn-close {
  filter: invert(1) grayscale(1);
}

.notification-settings-heading > div,
.notification-preference-name > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.notification-preference-name {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-preference-control {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

.notification-preference-control .form-check-input {
  margin: 0;
}

@media (max-width: 768px) {
  header.site-header:has(#notificationSidebar.show, #notificationSidebar.showing, #notificationSidebar.hiding) {
    z-index: 10002;
  }

  #notificationSidebar.offcanvas-end {
    z-index: 10001;
  }

  .account-clinic-page .table-responsive {
    border-radius: 8px;
    overflow-x: auto;
  }

  .account-clinic-page .clinic-request-card,
  .account-notifications-page .notifications-inbox-card,
  .account-notification-settings {
    padding: 18px !important;
  }

  .account-notification-settings .notification-preferences-table {
    min-width: 0;
  }

  .account-notification-settings .notification-preferences-table tbody tr:not(.account-table-empty) td:first-child {
    display: block;
    text-align: start;
  }

  .account-notification-settings .notification-preferences-table tbody tr:not(.account-table-empty) td:first-child::before {
    display: none;
  }

  .account-notification-settings .notification-preferences-table tbody tr:not(.account-table-empty) td:not(:first-child) {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-block: 4px;
  }

  .account-notification-settings .notification-settings-heading .btn,
  .account-notification-settings .notification-settings-save {
    min-height: 44px;
    white-space: normal;
    width: 100%;
  }
}

/* Shared storefront side drawer foundation */
.storefront-drawer,
#cartSidebar.storefront-drawer,
#notificationSidebar.storefront-drawer {
  --bs-offcanvas-width: min(430px, 100vw);
  width: min(430px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-inline-start: 1px solid var(--border-muted);
  background: var(--surface-primary);
  color: var(--text);
  box-shadow: -18px 0 48px rgb(0 0 0 / 16%);
}

[dir="rtl"] .storefront-drawer {
  box-shadow: 18px 0 48px rgb(0 0 0 / 16%);
}

.storefront-drawer__header,
#cartSidebar .storefront-drawer__header {
  min-height: 82px;
  flex: 0 0 auto;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-muted);
  background: var(--surface-primary);
}

.storefront-drawer__heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.storefront-drawer__icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-muted));
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
  color: var(--accent);
}

.storefront-drawer__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.storefront-drawer__title,
#cartSidebar .storefront-drawer__title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.3;
}

.storefront-drawer__count {
  color: var(--muted);
  font-weight: 650;
}

.storefront-drawer__close,
#cartSidebar .storefront-drawer__close {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  background-image: none !important;
  background-color: #fd161670;
  color: var(--muted);
  filter: none !important;
  opacity: 1;
  position: relative;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.storefront-drawer__close::before,
.storefront-drawer__close::after {
  width: 18px;
  height: 2px;
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.storefront-drawer__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.storefront-drawer__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.storefront-drawer__close:hover,
.storefront-drawer__close:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border-muted));
  background-color: color-mix(in srgb, var(--accent) 10%, var(--surface-secondary));
  color: var(--text);
  transform: rotate(4deg);
}

.storefront-drawer__toolbar,
.notification-sidebar__toolbar {
  min-height: 46px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-muted);
  background: var(--surface-secondary);
  color: var(--muted);
  font-size: 12px;
}

.storefront-drawer__body,
#cartSidebar .storefront-drawer__body,
#notificationSidebar .storefront-drawer__body {
  min-height: 0;
  flex: 1 1 auto;
  padding: 0;
  overflow: hidden;
  background: var(--surface-primary);
}

.storefront-drawer__footer,
#cartSidebar .storefront-drawer__footer,
#notificationSidebar .storefront-drawer__footer {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 16px 20px max(16px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-muted);
  background: var(--surface-primary);
}

.storefront-drawer__state,
.notification-sidebar__state {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.storefront-drawer__retry {
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface-secondary);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.storefront-drawer__retry:hover,
.storefront-drawer__retry:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.storefront-drawer__primary-action,
.storefront-drawer__secondary-action {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.storefront-drawer__primary-action {
  background: var(--accent);
  color: #fff;
}

.storefront-drawer__secondary-action {
  background: transparent;
  color: var(--text);
}

.storefront-drawer__primary-action:hover,
.storefront-drawer__primary-action:focus-visible {
  background: #08733d;
  border-color: #08733d;
  color: #fff;
}

.storefront-drawer__secondary-action:hover,
.storefront-drawer__secondary-action:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.storefront-drawer :where(button, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 24%, transparent);
  outline-offset: 2px;
}

#cartSidebar .cart-sidebar-items {
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#cartSidebar .cart-item,
#cartSidebar .cart-item:last-child {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  background: var(--surface-secondary);
}

#cartSidebar .cart-img {
  width: 64px;
  height: 64px;
  padding: 5px;
  border-radius: 11px;
  background: var(--surface-primary);
  object-fit: contain;
}

#cartSidebar .cart-item__name,
#cartSidebar .price,
#cartSidebar .fw-semibold,
#cartSidebar small {
  color: var(--text);
}

#cartSidebar .qy-number {
  color: var(--muted);
  font-size: 12px;
}

#cartSidebar .btn-link {
  width: 38px;
  height: 38px;
  min-width: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--muted);
}

#cartSidebar .btn-link:hover,
#cartSidebar .btn-link:focus-visible {
  border-color: var(--danger, #d94b56);
  color: var(--danger, #d94b56);
}

#cartSidebar .cart-item__promotion {
  width: fit-content;
  display: block;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border-muted));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-primary));
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

#cartSidebar .storefront-drawer__footer {
  display: block !important;
}

#cartSidebar .cart-sidebar-footer {
  display: grid;
  gap: 11px;
}

.storefront-drawer__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
}

.storefront-drawer__summary-row strong {
  color: var(--text);
}

.storefront-drawer__summary-row--saving,
.storefront-drawer__summary-row--saving strong {
  color: var(--accent);
}

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

#cartSidebar .storefront-drawer__primary-action {
  width: 100%;
}

#notificationSidebar .notification-sidebar__list {
  height: 100%;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
}

#notificationSidebar .notification-sidebar__item,
#notificationSidebar .notification-sidebar__item.is-unread {
  padding: 13px 14px;
  border: 1px solid var(--border-muted);
  border-radius: 13px;
  background: var(--surface-secondary);
}

#notificationSidebar .notification-sidebar__item.is-unread {
  position: relative;
  padding-inline-end: 34px;
  background: var(--surface-secondary);
}

#notificationSidebar .notification-sidebar__item.is-unread::after {
  width: 8px;
  height: 8px;
  position: absolute;
  inset-block-start: 17px;
  inset-inline-end: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
  content: "";
}

@media (max-width: 575.98px) {

  .storefront-drawer,
  #cartSidebar.storefront-drawer,
  #notificationSidebar.storefront-drawer {
    --bs-offcanvas-width: 100vw;
    width: 100vw;
  }

  .storefront-drawer__header,
  #cartSidebar .storefront-drawer__header {
    padding-inline: 16px;
  }

  .storefront-drawer__footer,
  #cartSidebar .storefront-drawer__footer,
  #notificationSidebar .storefront-drawer__footer {
    padding-inline: 16px;
  }

  #cartSidebar .cart-sidebar-items {
    padding: 16px !important;
  }
}

.account-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.account-detail-list>div {
  border-bottom: 1px solid var(--border-muted);
  display: grid;
  gap: 5px;
  padding: 16px 18px;
}

.account-detail-list>div:nth-child(odd) {
  border-inline-end: 1px solid var(--border-muted);
}

.account-detail-list dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.account-detail-list dd {
  color: var(--text-secondary);
  margin: 0;
  overflow-wrap: anywhere;
}

.account-verification-card {
  margin-inline: auto;
  max-width: 640px;
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
}

.account-verification-card__icon,
.auth-state-icon {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border-muted));
  border-radius: 18px;
  color: var(--accent);
  display: inline-flex;
  font-size: 24px;
  height: 62px;
  justify-content: center;
  margin-bottom: 18px;
  width: 62px;
}

.account-verification-card h2 {
  color: var(--text);
}

.account-verification-card p {
  color: var(--muted);
}

.auth-shell {
  background: var(--bg);
  color: var(--text);
  min-height: calc(100dvh - var(--header-h, 72px));
  position: relative;
}

.auth-shell .product-breadcrumb {
  display: none;
}

.auth-shell__inner,
.auth-shell .auth-wrapper {
  min-height: calc(100dvh - var(--header-h, 72px));
}

.auth-shell .auth-wrapper {
  padding: clamp(34px, 6vw, 72px) 16px;
}

.auth-shell .auth-box {
  background: var(--surface-primary);
  border: 1px solid var(--border-muted);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  color: var(--text);
  max-width: 520px;
  padding: clamp(24px, 4vw, 42px);
  width: 100%;
}

.auth-shell .auth-title {
  color: var(--text) !important;
}

.auth-shell .auth-text,
.auth-shell .form-text,
.auth-shell .text-muted {
  color: var(--muted) !important;
}

.auth-shell .auth-input {
  background: var(--surface-secondary) !important;
  border-color: var(--border-muted) !important;
  caret-color: var(--accent);
  color: var(--text) !important;
  min-height: 48px;
  -webkit-text-fill-color: var(--text) !important;
}

.auth-shell .auth-input:focus {
  background: var(--surface-secondary) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.auth-shell .auth-input::placeholder {
  color: var(--muted) !important;
  opacity: 1;
  -webkit-text-fill-color: var(--muted) !important;
}

.auth-shell .auth-input:-webkit-autofill,
.auth-shell .auth-input:-webkit-autofill:hover,
.auth-shell .auth-input:-webkit-autofill:focus,
.auth-shell .auth-input:-webkit-autofill:active {
  border-color: var(--border-muted) !important;
  box-shadow: 0 0 0 1000px var(--surface-secondary) inset !important;
  caret-color: var(--accent) !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 9999s ease-out 0s;
}

.auth-shell .auth-input:disabled,
.auth-shell .auth-input[readonly] {
  background: var(--surface-strong) !important;
  color: var(--muted) !important;
  cursor: not-allowed;
  opacity: .78;
  -webkit-text-fill-color: var(--muted) !important;
}

.auth-shell .form-check-input {
  background-color: var(--surface-secondary);
  border-color: var(--muted);
}

.auth-shell .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.auth-shell .form-check-input:checked::after {
  color: #07140d;
}

.auth-shell .theme-dark,
[data-theme="dark"] .auth-shell .theme-dark {
  display: block !important;
}

[data-theme="light"] .auth-shell .theme-dark {
  display: none !important;
}

[data-theme="light"] .auth-shell .theme-light {
  display: block !important;
}

@media (max-width: 768px) {

  body.account-menu-route,
  body.auth-mobile-root {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .account-detail-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-detail-list>div:nth-child(odd) {
    border-inline-end: 0;
  }

  .account-detail-list>div:last-child {
    border-bottom: 0;
  }

  .account-panel__heading .account-status-pill {
    align-self: flex-start;
  }

  .service-requests-page .service-page-header,
  .service-requests-page .service-ticket-header,
  .service-requests-page .service-request-row,
  .service-requests-page .service-form-actions {
    min-width: 0;
  }

  .service-requests-page .service-ticket-header,
  .service-requests-page .service-page-header,
  .service-requests-page .service-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .service-requests-page .service-ticket-header h2,
  .service-requests-page .service-request-row h3,
  .service-requests-page .service-message,
  .service-requests-page dd {
    overflow-wrap: anywhere;
  }

  .service-requests-page .service-form-actions .btn {
    justify-content: center;
    min-height: 48px;
    width: 100%;
  }

  .auth-shell__inner,
  .auth-shell .auth-wrapper,
  .auth-shell .auth-wrapper.min-vh-100 {
    min-height: calc(100dvh - var(--header-h, 72px));
  }

  .auth-shell .auth-wrapper {
    padding: 22px 14px 34px;
  }

  .auth-shell .auth-box {
    border-radius: 18px;
    padding: 24px 18px;
  }

  .auth-mobile-child .auth-shell__inner,
  .auth-mobile-child .auth-shell .auth-wrapper,
  .auth-mobile-child .auth-shell .auth-wrapper.min-vh-100 {
    min-height: calc(100dvh - var(--header-h, 72px) - 58px);
  }

  .auth-shell .d-flex.justify-content-between.align-items-center {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 10px;
  }
}

/* Checkout-aligned customer account surfaces */
.account-page {
  --account-accent-text: #08733d;
  background: var(--bg-section);
  color: var(--text);
  font-family: inherit;
  padding: 0 0 clamp(72px, 7vw, 112px);
}

[data-theme="dark"] .account-page {
  --account-accent-text: #2bd176;
}

.account-page__container {
  margin-inline: auto;
  max-width: 1480px;
  padding-inline: clamp(16px, 4vw, 64px);
  width: 100%;
}

.account-page__breadcrumb {
  margin: 0;
}

.account-page__header {
  align-items: flex-end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.account-page__eyebrow,
.account-card-label {
  color: var(--account-accent-text);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.account-page__header h1 {
  color: var(--text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 700;
  letter-spacing: -.025em;
  margin: 0 0 8px;
}

.account-page__description {
  color: var(--muted);
  font-size: 15px;
  margin: 0;
  max-width: 720px;
}

.account-page__badge {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  gap: 8px;
}

.account-page__badge i {
  color: var(--account-accent-text);
}

.account-page__layout {
  align-items: start;
  display: grid;
  gap: clamp(24px, 3vw, 40px);
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
}

.account-page__sidebar,
.account-page__content {
  min-width: 0;
}

.account-page__sidebar {
  position: sticky;
  top: 104px;
}

.account-panel,
.account-page .account-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  box-shadow: none;
}

.account-panel__heading {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 20px clamp(18px, 2.5vw, 26px);
}

.account-panel__heading--compact {
  border-bottom: 0;
  padding: 0 0 20px;
}

.account-panel__heading-copy {
  align-items: center;
  display: flex;
  gap: 13px;
  min-width: 0;
}

.account-panel__icon,
.account-navigation__icon,
.account-dashboard-card__icon {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 11px;
  color: var(--account-accent-text, var(--accent));
  display: inline-flex;
  flex: 0 0 42px;
  height: 42px;
  justify-content: center;
}

.account-panel__heading h2,
.account-panel__heading h3 {
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  margin: 0;
}

.account-panel__heading p {
  color: var(--muted);
  font-size: 12px;
  margin: 3px 0 0;
}

.account-text-link {
  align-items: center;
  color: var(--account-accent-text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  text-decoration: none;
}

.account-text-link:hover,
.account-text-link:focus-visible {
  color: var(--text);
}

[dir="rtl"] .account-page__breadcrumb>i,
[dir="rtl"] .account-text-link>i,
[dir="rtl"] .account-dashboard-card>i,
[dir="rtl"] .account-button>i {
  transform: rotate(180deg);
}

/* Account navigation */
.profile-page .settings-sidebar.account-navigation {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: var(--text);
  overflow: hidden;
  padding: 0;
}

.account-navigation__heading {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  padding: 20px;
}

.account-navigation__heading p {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  margin: 0;
}

.account-navigation__heading>div>span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

.profile-page .account-navigation__menu {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 10px;
}

.profile-page .account-navigation__menu>li,
.profile-page .account-navigation__menu>li:not(:first-child) {
  border: 0;
  margin: 0;
  padding: 0;
  width: 100%;
}

.profile-page .account-navigation__menu>li>a,
.profile-page .account-navigation__menu .logout-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  display: flex;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  gap: 10px;
  min-height: 43px;
  padding: 10px 11px;
  text-align: start;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease;
  width: 100%;
}

.profile-page .account-navigation__menu>li>a i,
.profile-page .account-navigation__menu .logout-button i {
  color: currentColor;
  flex: 0 0 18px;
  margin: 0 !important;
  padding: 0;
  text-align: center;
}

.profile-page .account-navigation__menu>li>a:hover,
.profile-page .account-navigation__menu>li>a:focus-visible,
.profile-page .account-navigation__menu .logout-button:hover,
.profile-page .account-navigation__menu .logout-button:focus-visible {
  background: var(--surface-primary);
  color: var(--text);
}

.profile-page .account-navigation__menu>li.active>a {
  background: color-mix(in srgb, var(--accent) 9%, var(--surface-primary));
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--account-accent-text, var(--accent));
}

[dir="rtl"] .profile-page .account-navigation__menu>li.active>a {
  box-shadow: inset -3px 0 0 var(--accent);
}

.profile-page .account-navigation__menu .account-navigation__logout {
  border-top: 1px solid var(--border);
  margin-top: 7px;
  padding-top: 7px;
}

.profile-page .account-navigation__menu .logout-button:hover,
.profile-page .account-navigation__menu .logout-button:focus-visible {
  color: #dc3545;
}

/* Shared controls and feedback */
.account-control,
.account-page .account-settings-final .form-control.dark-input,
.account-page .account-settings-final .form-select.dark-input,
.account-page .account-settings-final select.dark-input,
.account-page .account-settings-final textarea.dark-input {
  appearance: none;
  background-color: var(--surface-primary) !important;
  border: 1px solid var(--border-muted) !important;
  border-radius: 10px;
  color: var(--text) !important;
  font: inherit;
  font-size: 14px;
  min-height: 50px;
  outline: 0;
  padding: 12px 14px;
  -webkit-text-fill-color: var(--text) !important;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  width: 100%;
}

.account-control::placeholder,
.account-page .account-settings-final .dark-input::placeholder {
  color: var(--muted-light) !important;
  opacity: 1;
  -webkit-text-fill-color: var(--muted-light) !important;
}

.account-control:focus,
.account-page .account-settings-final .dark-input:focus {
  background-color: var(--surface-primary) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent) !important;
}

.account-button,
.account-page .account-button {
  align-items: center;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 46px;
  padding: 11px 17px;
  text-decoration: none;
  transition: filter .18s ease, transform .18s ease, box-shadow .18s ease;
}

.account-button--primary,
.account-page .account-settings-final .save-btn,
.account-page .account-settings-final .btn-success {
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  color: #07140d;
  font-weight: 700;
}

.account-button--primary:hover,
.account-button--primary:focus-visible,
.account-page .account-settings-final .save-btn:hover,
.account-page .account-settings-final .btn-success:hover {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 23%, transparent);
  color: #07140d;
  filter: brightness(.95);
  transform: translateY(-1px);
}

.account-button--secondary {
  background: var(--text);
  color: var(--bg-card);
}

.account-button--secondary:hover,
.account-button--secondary:focus-visible {
  color: var(--bg-card);
  filter: opacity(.86);
}

.account-button--disabled,
.account-button:disabled {
  background: var(--surface-strong);
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}

.account-field-message {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 0 0;
  min-height: 18px;
}

.account-field-message.is-success {
  color: var(--account-accent-text);
}

.account-field-message.is-error {
  color: #dc3545;
}

.account-inline-action {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 750;
  padding: 0 3px;
  text-decoration: underline;
}

.account-security-note {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 11px;
  gap: 7px;
  justify-content: center;
  margin: 11px 0 0;
  text-align: center;
}

.account-alert {
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  display: flex;
  gap: 11px;
  margin-bottom: 24px;
  padding: 14px 16px;
}

.account-alert--success {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border-color: color-mix(in srgb, var(--accent) 36%, var(--border));
}

.account-alert--success i {
  color: var(--account-accent-text);
  margin-top: 3px;
}

/* Cart */
.cart-layout {
  align-items: start;
  display: grid;
  gap: clamp(20px, 2.5vw, 30px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
}

.cart-layout.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.cart-main-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.cart-container {
  overflow: hidden;
}

.cart-table-header,
.cart-product-row {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(180px, 1fr) 105px 122px 105px 28px;
  padding-inline: clamp(16px, 2.5vw, 24px);
}

@media (min-width: 768px) and (max-width: 1199.98px) {

  .cart-table-header,
  .cart-product-row,
  .cart-product-row.product-row {
    gap: 8px;
    grid-template-columns: minmax(150px, 1fr) minmax(72px, 90px) minmax(104px, 110px) minmax(72px, 90px) 28px;
    padding-inline: 12px;
  }

  .cart-product__image {
    flex-basis: 64px;
    height: 64px;
  }
}

.cart-table-header {
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  min-height: 43px;
  text-transform: uppercase;
}

.cart-product-row,
.cart-product-row.product-row {
  border-bottom: 1px solid var(--border);
  border-top: 0;
  min-height: 112px;
  margin: 0;
  padding-block: 15px;
  padding-inline: clamp(16px, 2.5vw, 24px);
  transition: opacity .18s ease;
}

.cart-product-row:last-child {
  border-bottom: 0;
}

#cart-page.is-updating .cart-product-row,
#cart-page.is-updating .cart-summary__rows {
  opacity: .6;
}

.cart-product {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.cart-product__image,
.wishlist-product__image {
  align-items: center;
  background: var(--bg-image);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex: 0 0 78px;
  height: 78px;
  justify-content: center;
  overflow: hidden;
}

.cart-product__image img,
.wishlist-product__image img {
  height: 100%;
  object-fit: contain;
  padding: 5px;
  width: 100%;
}

.cart-product h3 {
  color: var(--text);
  display: -webkit-box;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.cart-price-stack {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  gap: 2px;
}

.cart-price-stack strong,
.cart-line-total {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.cart-original-price {
  color: var(--muted);
  font-size: 10px;
  text-decoration: line-through;
}

.cart-promotion-badge {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-primary));
  border-radius: 999px;
  color: var(--account-accent-text);
  display: inline-flex;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  margin-top: 7px;
  max-width: 100%;
  padding: 4px 7px;
}

.cart-quantity {
  align-items: center;
  background: var(--surface-primary);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-grid;
  grid-template-columns: 30px 28px 30px;
  justify-content: center;
  padding: 4px;
}

.cart-quantity button {
  align-items: center;
  background: var(--surface-strong);
  border: 0;
  border-radius: 50%;
  color: var(--text);
  display: inline-flex;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.cart-quantity button:hover,
.cart-quantity button:focus-visible {
  color: var(--account-accent-text);
}

.cart-quantity span {
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.cart-remove,
.wishlist-remove-btn {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  display: inline-flex;
  height: 32px;
  justify-content: center;
  padding: 0;
  width: 32px;
}

.cart-remove:hover,
.cart-remove:focus-visible,
.wishlist-remove-btn:hover,
.wishlist-remove-btn:focus-visible {
  background: color-mix(in srgb, #dc3545 10%, transparent);
  color: #dc3545;
}

.cart-mobile-summary {
  display: none;
}

.cart-empty-state {
  align-items: center;
  display: flex;
  gap: 15px;
  min-height: 170px;
  padding: 28px;
}

.cart-empty-state>span {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-primary));
  border-radius: 12px;
  color: var(--account-accent-text);
  display: inline-flex;
  flex: 0 0 48px;
  height: 48px;
  justify-content: center;
}

.cart-empty-state h3 {
  color: var(--text);
  font-size: 17px;
  margin: 0 0 4px;
}

.cart-empty-state p {
  color: var(--muted);
  font-size: 12px;
  margin: 0 0 7px;
}

.cart-empty-state a {
  color: var(--account-accent-text);
  font-size: 12px;
  font-weight: 700;
}

.cart-coupon {
  padding: clamp(20px, 2.5vw, 26px);
}

.cart-coupon__controls {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.cart-coupon__controls .account-control {
  text-transform: uppercase;
}

.cart-coupon__controls .account-button {
  min-width: 92px;
}

.cart-summary {
  padding: clamp(20px, 2.5vw, 26px);
  position: sticky;
  top: 104px;
}

.cart-summary__rows {
  border-block: 1px solid var(--border);
  display: grid;
  gap: 13px;
  padding-block: 20px;
  transition: opacity .18s ease;
}

.cart-summary__row {
  align-items: baseline;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 16px;
  justify-content: space-between;
}

.cart-summary__row strong {
  color: var(--text);
  font-size: 13px;
  text-align: end;
}

.cart-summary__row--discount strong {
  color: var(--account-accent-text);
}

.cart-summary__row--total {
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  margin-top: 4px;
  padding-top: 17px;
}

.cart-summary__row--total strong {
  font-size: 20px;
  font-weight: 750;
}

.cart-summary__row.is-hidden {
  display: none;
}

.cart-estimate-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  margin: 13px 0 0;
}

.cart-checkout-button {
  margin-top: 18px;
  min-height: 52px;
  width: 100%;
}

.cart-checkout-button[hidden] {
  display: none;
}

/* Wishlist */
.wishlist-panel {
  overflow: hidden;
}

.wishlist-table-header,
.wishlist-row {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(190px, 1fr) 150px 140px 132px 32px;
  padding-inline: clamp(16px, 2.5vw, 24px);
}

.wishlist-table-header {
  background: var(--surface-primary);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  min-height: 43px;
  text-transform: uppercase;
}

.wishlist-row {
  border-bottom: 1px solid var(--border);
  min-height: 112px;
  padding-block: 15px;
}

.wishlist-row:last-child {
  border-bottom: 0;
}

.wishlist-product {
  align-items: center;
  color: var(--text);
  display: flex;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.wishlist-product:hover,
.wishlist-product:focus-visible {
  color: var(--account-accent-text);
}

.wishlist-product__copy {
  min-width: 0;
}

.wishlist-product__copy strong {
  display: -webkit-box;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.wishlist-product__copy small {
  color: var(--muted);
  display: block;
  font-size: 10px;
  margin-top: 4px;
}

.wishlist-price {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wishlist-price strong {
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.wishlist-price s {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.wishlist-stock-pill {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 6px;
  padding: 6px 9px;
  white-space: nowrap;
}

.wishlist-stock-pill.is-in-stock {
  background: color-mix(in srgb, var(--accent) 11%, var(--surface-primary));
  color: var(--account-accent-text);
}

.wishlist-stock-pill.is-out-of-stock {
  background: color-mix(in srgb, #dc3545 10%, var(--surface-primary));
  color: #dc3545;
}

.wishlist-actions .account-button {
  min-width: 120px;
  white-space: nowrap;
}

.wishlist-remove-form {
  margin: 0;
}

.wishlist-empty-state {
  padding: 24px;
}

/* Profile overview */
.account-overview-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  margin-bottom: 20px;
}

.account-profile-card,
.account-address-card {
  padding: clamp(22px, 3vw, 30px);
}

.account-profile-card__identity {
  align-items: center;
  display: flex;
  gap: 17px;
}

.account-profile-card__avatar {
  border: 3px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  border-radius: 50%;
  display: inline-flex;
  flex: 0 0 84px;
  height: 84px;
  overflow: hidden;
}

.account-profile-card__avatar img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.account-profile-card__identity h2 {
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 3px;
}

.account-profile-card__identity p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.account-profile-card__details {
  border-block: 1px solid var(--border);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 22px 0 18px;
  padding-block: 17px;
}

.account-profile-card__details div {
  min-width: 0;
}

.account-profile-card__details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.account-profile-card__details dd {
  color: var(--text);
  font-size: 12px;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-address-card .account-panel__heading {
  padding-bottom: 18px;
}

.account-address-card address {
  border-block: 1px solid var(--border);
  display: grid;
  font-size: 12px;
  font-style: normal;
  gap: 4px;
  margin: 0 0 18px;
  padding-block: 17px;
}

.account-address-card address strong {
  color: var(--text);
  font-size: 14px;
}

.account-address-card address span {
  color: var(--muted);
}

.account-address-card__empty {
  align-items: flex-start;
  border-block: 1px solid var(--border);
  color: var(--muted);
  display: flex;
  font-size: 12px;
  gap: 10px;
  margin: 0 0 18px;
  padding-block: 19px;
}

.account-address-card__empty i {
  color: var(--account-accent-text);
  margin-top: 3px;
}

.account-address-card__empty p {
  margin: 0;
}

.account-section-title {
  align-items: end;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin: 30px 0 17px;
}

.account-section-title h2 {
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.account-section-title p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.account-dashboard__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-dashboard-card {
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  display: grid;
  gap: 13px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 102px;
  padding: 17px;
  text-decoration: none;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.account-dashboard-card:hover,
.account-dashboard-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 10px 25px color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--text);
  transform: translateY(-2px);
}

.account-dashboard-card strong,
.account-dashboard-card small {
  display: block;
}

.account-dashboard-card strong {
  color: var(--text);
  font-size: 13px;
  margin-bottom: 4px;
}

.account-dashboard-card small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.account-dashboard-card>i {
  color: var(--muted);
  font-size: 12px;
}

.account-dashboard-card:hover>i,
.account-dashboard-card:focus-visible>i {
  color: var(--account-accent-text);
}

.account-page .professional-join-panel {
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border));
  border-radius: 16px;
  box-shadow: 0 18px 40px color-mix(in srgb, #0d2b22 18%, transparent);
}

/* Account settings */
.account-settings-content .account-settings-final {
  max-width: none;
  padding: clamp(22px, 3vw, 30px) !important;
}

.account-page .account-settings-final .account-title {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 24px !important;
  padding-bottom: 14px;
}

.account-page .account-settings-final .form-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.account-page .account-settings-final .text-muted {
  color: var(--muted) !important;
}

.account-page .profile-img-final {
  border: 3px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  height: 170px;
  width: 170px;
}

.account-page .choose-btn-final,
.account-page .account-settings-final .btn-outline-success,
.account-page .account-settings-final .btn-outline-dark {
  background: transparent;
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  color: var(--text) !important;
  font-weight: 650;
  min-height: 42px;
}

.account-page .choose-btn-final:hover,
.account-page .account-settings-final .btn-outline-success:hover,
.account-page .account-settings-final .btn-outline-dark:hover {
  background: var(--surface-primary) !important;
  border-color: var(--accent);
  color: var(--account-accent-text) !important;
}

.account-page .account-settings-final .alert-success {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  color: var(--account-accent-text);
  justify-content: flex-start;
}

.account-page .account-settings-final .alert-danger {
  background: color-mix(in srgb, #dc3545 9%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, #dc3545 35%, var(--border));
  color: var(--text);
}

.account-page .account-notification-settings .table-responsive {
  border: 1px solid var(--border);
  border-radius: 10px;
}

/* Bring legacy profile subpages into the same surface system. */
.profile-page:not(.account-page) {
  background: var(--bg-section);
  color: var(--text);
}

.profile-page .table-wrapper,
.profile-page .service-request-card,
.profile-page .settings-card,
.profile-page .clinic-request-card {
  background: var(--bg-card);
  border-color: var(--border);
  border-radius: 16px;
  color: var(--text);
}

.profile-page .history-table .table-heading th {
  color: var(--text) !important;
  font-size: 19px;
  font-weight: 700;
}

.profile-page table.history-table thead tr:not(.table-heading) {
  background: var(--surface-primary);
}

.profile-page table.history-table thead th,
.profile-page table.history-table tbody tr td {
  border-color: var(--border);
  color: var(--text-secondary);
}

@media (max-width: 1399.98px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-summary {
    position: static;
  }

  .wishlist-table-header,
  .wishlist-row {
    gap: 12px;
    grid-template-columns: minmax(170px, 1fr) 120px 120px 120px 32px;
  }
}

@media (max-width: 991.98px) {
  .account-page__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-page__sidebar {
    position: static;
  }

  .account-page .account-navigation__heading {
    display: none;
  }

  .account-page .account-navigation__menu {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 8px;
    scrollbar-width: thin;
  }

  .account-page .account-navigation__menu>li,
  .account-page .account-navigation__menu>li:not(:first-child) {
    flex: 0 0 auto;
    width: auto;
  }

  .account-page .account-navigation__menu>li>a,
  .account-page .account-navigation__menu .logout-button {
    min-height: 40px;
    padding-inline: 13px;
    white-space: nowrap;
  }

  .account-page .account-navigation__menu .account-navigation__logout {
    border-inline-start: 1px solid var(--border);
    border-top: 0;
    margin: 0 0 0 3px;
    padding: 0 0 0 8px;
  }

  [dir="rtl"] .account-page .account-navigation__menu .account-navigation__logout {
    margin: 0 3px 0 0;
    padding: 0 8px 0 0;
  }

  .account-page .account-navigation__menu>li.active>a,
  [dir="rtl"] .account-page .account-navigation__menu>li.active>a {
    box-shadow: inset 0 -3px 0 var(--accent);
  }
}

@media (max-width: 767.98px) {

  body.has-account-mobile-navigation,
  body:has([data-mobile-profile-nav]) {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  body.has-account-mobile-navigation .mobile-nav,
  body:has([data-mobile-profile-nav]) .mobile-nav {
    display: none !important;
  }

  .profile-page .col-12:has(> [data-mobile-profile-nav]),
  .account-page__sidebar:has(> [data-mobile-profile-nav]),
  .account-order-details-page .col-12:has(> [data-mobile-profile-nav]) {
    height: 0;
    margin: 0 !important;
    min-height: 0;
    padding: 0 !important;
  }

  [data-mobile-profile-nav].settings-sidebar.account-navigation {
    background: var(--bg-card);
    border: 0;
    border-radius: 0;
    border-top: 1px solid var(--border);
    bottom: 0 !important;
    box-shadow: 0 -12px 30px color-mix(in srgb, #000 18%, transparent);
    inset-inline: 0 !important;
    margin: 0 !important;
    max-width: none;
    overflow: hidden;
    padding: 0;
    position: fixed !important;
    top: auto !important;
    width: 100%;
    z-index: 10020;
  }

  [data-mobile-profile-nav] .account-navigation__heading {
    display: none !important;
  }

  [data-mobile-profile-nav] .account-navigation__menu,
  .account-page [data-mobile-profile-nav] .account-navigation__menu {
    -webkit-overflow-scrolling: touch;
    display: flex !important;
    gap: 4px;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    scroll-snap-type: inline proximity;
    scroll-padding-inline: 12px;
    scrollbar-width: none;
  }

  [data-mobile-profile-nav] .account-navigation__menu::-webkit-scrollbar {
    display: none;
  }

  [data-mobile-profile-nav] .account-navigation__menu>li,
  [data-mobile-profile-nav] .account-navigation__menu>li:not(:first-child) {
    flex: 0 0 auto;
    margin: 0;
    padding: 0 !important;
    scroll-snap-align: center;
    width: auto;
  }

  [data-mobile-profile-nav] .account-navigation__menu>li>a,
  [data-mobile-profile-nav] .account-navigation__menu .logout-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    font-size: 10px;
    font-weight: 700;
    gap: 5px;
    justify-content: center;
    line-height: 1.15;
    min-height: 58px;
    min-width: 76px;
    padding: 7px 8px;
    position: relative;
    white-space: nowrap;
  }

  [data-mobile-profile-nav] .account-navigation__menu>li>a i,
  [data-mobile-profile-nav] .account-navigation__menu .logout-button i {
    flex: 0 0 auto;
    font-size: 19px;
    height: 20px;
    line-height: 20px;
    width: 22px;
  }

  [data-mobile-profile-nav] .account-navigation__menu>li>a>span:not(.badge),
  [data-mobile-profile-nav] .account-navigation__menu .logout-button>span {
    display: block;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  [data-mobile-profile-nav] .account-navigation__menu>li.active>a,
  [dir="rtl"] [data-mobile-profile-nav] .account-navigation__menu>li.active>a {
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
    border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
    box-shadow: inset 0 3px 0 var(--accent);
    color: var(--account-accent-text, var(--accent));
  }

  [data-mobile-profile-nav] .account-navigation__menu .badge {
    font-size: 8px;
    inset-inline-end: 4px;
    margin: 0 !important;
    padding: 2px 4px;
    position: absolute;
    top: 4px;
  }

  [data-mobile-profile-nav] .account-navigation__logout {
    display: none;
  }

  .account-page__header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .account-page__layout {
    gap: 0;
  }

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

  .account-panel__heading--compact {
    flex-direction: row;
  }

  .cart-table-header,
  .wishlist-table-header {
    display: none;
  }

  .cart-product-row,
  .cart-product-row.product-row {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product remove"
      "mobile mobile"
      "quantity quantity";
    padding-block: 18px;
    padding-inline: clamp(16px, 2.5vw, 24px);
  }

  .cart-product {
    grid-area: product;
  }

  .cart-product-row>.cart-price-stack,
  .cart-product-row>.cart-line-total {
    display: none;
  }

  .cart-quantity {
    grid-area: quantity;
    justify-self: start;
  }

  .cart-remove {
    grid-area: remove;
  }

  .cart-mobile-summary {
    display: grid;
    gap: 10px;
    grid-area: mobile;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cart-mobile-summary span {
    color: var(--muted);
    display: grid;
    font-size: 10px;
    gap: 3px;
    text-transform: uppercase;
  }

  .cart-mobile-summary strong {
    color: var(--text);
    font-size: 12px;
    text-transform: none;
  }

  .cart-coupon__controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .wishlist-row {
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "product remove"
      "price stock"
      "actions actions";
    padding-block: 18px;
  }

  .wishlist-product {
    grid-area: product;
  }

  .wishlist-price {
    grid-area: price;
  }

  .wishlist-stock {
    grid-area: stock;
    justify-self: end;
  }

  .wishlist-actions {
    grid-area: actions;
  }

  .wishlist-actions .account-button {
    width: 100%;
  }

  .wishlist-remove-form {
    grid-area: remove;
  }

  .wishlist-price::before,
  .wishlist-stock::before {
    color: var(--muted);
    content: attr(data-label);
    display: block;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: .05em;
    margin-bottom: 5px;
    text-transform: uppercase;
  }

  .account-overview-grid,
  .account-dashboard__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .account-page .professional-join-panel {
    border-radius: 16px;
  }

  .account-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 480px) {
  .account-profile-card__identity {
    align-items: flex-start;
  }

  .account-profile-card__avatar {
    flex-basis: 68px;
    height: 68px;
  }

  .account-profile-card__details {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-product__image,
  .wishlist-product__image {
    flex-basis: 64px;
    height: 64px;
  }

  .account-dashboard-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .account-dashboard-card>i {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  .account-page *,
  .account-page *::before,
  .account-page *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Unified account shell and app-style profile navigation */
.account-menu-mobile,
.account-mobile-page-header {
  display: none;
}

.account-menu-desktop {
  display: block;
}

.account-page__container {
  margin-inline: auto;
  max-width: 1520px;
  padding: 24px clamp(20px, 4vw, 64px) 64px;
  width: 100%;
}

.account-page__layout {
  align-items: start;
  display: grid;
  gap: 32px;
  grid-template-columns: 340px minmax(0, 1fr);
}

.account-page__sidebar {
  min-width: 0;
  width: 340px;
}

.account-navigation--desktop {
  background: var(--surface-primary);
  border: 1px solid var(--border-muted);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h, 72px) + 20px);
  width: 340px;
}

.account-navigation__heading {
  align-items: center;
  border-bottom: 1px solid var(--border-muted);
  display: flex;
  gap: 14px;
  padding: 20px 18px;
}

.account-navigation__icon {
  align-items: center;
  background: color-mix(in srgb, var(--accent) 13%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border-muted));
  border-radius: 12px;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 46px;
  height: 46px;
  justify-content: center;
}

.account-navigation__heading p {
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
  margin: 0 0 2px;
}

.account-navigation__heading span:not(.account-navigation__icon) {
  color: var(--muted);
  font-size: 12px;
}

.account-navigation__menu {
  display: grid;
  gap: 3px;
  margin: 0;
  padding: 10px;
}

.account-navigation__menu>li {
  margin: 0;
}

.account-navigation__menu>li>a,
.account-navigation__menu .logout-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--text-secondary);
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  text-align: start;
  text-decoration: none;
  width: 100%;
}

.account-navigation__menu>li>a i,
.account-navigation__menu .logout-button i {
  color: var(--muted);
  flex: 0 0 18px;
  text-align: center;
}

.account-navigation__menu>li.active>a {
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--account-accent-text, var(--accent));
}

[dir="rtl"] .account-navigation__menu>li.active>a {
  box-shadow: inset -3px 0 0 var(--accent);
}

.account-navigation__menu>li.active>a i {
  color: var(--accent);
}

.account-navigation__logout {
  border-top: 1px solid var(--border-muted);
  margin-top: 6px !important;
  padding-top: 7px;
}

.account-navigation__logout .logout-button {
  color: var(--danger, #d94b56);
}

.account-content-toolbar {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.account-content-toolbar--end {
  justify-content: flex-end;
}

.account-content-toolbar h2,
.account-content-toolbar p {
  margin: 0;
}

.account-content-toolbar p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.account-table-wrapper {
  background: var(--surface-primary);
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.account-responsive-table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border-muted);
  margin: 0;
  width: 100%;
}

.account-responsive-table thead th {
  background: var(--surface-strong);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .035em;
  padding: 15px 18px;
  text-transform: uppercase;
  vertical-align: middle;
}

.account-responsive-table thead .table-heading th {
  background: var(--surface-primary);
  color: var(--text);
  font-size: 17px;
  letter-spacing: 0;
  padding-block: 20px;
}

.account-responsive-table tbody td {
  background: var(--surface-primary);
  color: var(--text-secondary);
  padding: 17px 18px;
  vertical-align: middle;
}

.account-responsive-table tbody tr:last-child td {
  border-bottom: 0;
}

.account-responsive-table a {
  color: var(--account-accent-text, var(--accent));
  font-weight: 700;
  text-decoration: none;
}

.account-responsive-table a.account-button--primary {
  color: #07140d;
}

.account-table-actions,
.history-table-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.account-status-pill {
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border-muted));
  border-radius: 999px;
  color: var(--text-secondary);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  width: fit-content;
  justify-self: end;
}

.account-status-pill.is-success {
  color: var(--account-accent-text, var(--accent));
}

.account-status-pill.is-info {
  border-color: color-mix(in srgb, #3182ce 30%, var(--border-muted));
  background: color-mix(in srgb, #3182ce 10%, var(--surface-primary));
  color: #2b6cb0;
}

.account-status-pill.is-warning {
  border-color: color-mix(in srgb, #d69e2e 35%, var(--border-muted));
  background: color-mix(in srgb, #d69e2e 11%, var(--surface-primary));
  color: #a56b08;
}

.enrolled-course-grid {
  display: grid;
  gap: 18px;
}

.enrolled-course-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--border-muted);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.enrolled-course-card__media {
  min-height: 210px;
  display: block;
  background: var(--surface-secondary);
}

.enrolled-course-card__media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.enrolled-course-card__body {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
}

.enrolled-course-card__heading,
.enrollment-learning-overview__heading,
.enrolled-course-progress__labels,
.enrolled-course-card__footer,
.enrolled-course-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.enrolled-course-card__heading {
  align-items: flex-start;
}

.enrolled-course-card__eyebrow,
.account-panel__eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.enrolled-course-card__heading h2,
.enrollment-learning-overview__heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.35;
}

.enrolled-course-card__heading h2 a {
  color: inherit;
  text-decoration: none;
}

.enrolled-course-card__heading h2 a:hover,
.enrolled-course-card__heading h2 a:focus-visible {
  color: var(--accent);
}

.enrolled-course-card__notice,
.enrolled-course-card__payment,
.enrolled-course-card__state-copy,
.enrollment-learning-overview__message,
.enrolled-course-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.enrolled-course-card__notice {
  color: #a56b08;
}

.enrolled-course-card__payment {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 7px;
  background: var(--surface-secondary);
}

.enrolled-course-card__notice i {
  margin-inline-end: 5px;
}

.enrolled-course-progress {
  display: grid;
  gap: 8px;
}

.enrolled-course-progress__labels {
  color: var(--text-secondary);
  font-size: 12px;
}

.enrolled-course-progress__labels strong {
  color: var(--accent);
}

.enrolled-course-progress__bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-strong);
}

.enrolled-course-progress__bar span {
  height: 100%;
  display: block;
  border-radius: inherit;
  background: var(--accent);
}

.enrolled-course-progress--large {
  gap: 11px;
}

.enrolled-course-progress--large .enrolled-course-progress__bar {
  height: 10px;
}

.enrolled-course-card__footer {
  align-self: end;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--border-muted);
  color: var(--muted);
  font-size: 11px;
}

.enrolled-course-card__actions {
  justify-content: flex-end;
  gap: 9px;
}

.enrolled-course-card__actions .account-button {
  min-height: 38px;
  padding: 8px 13px;
}

.enrolled-course-empty {
  padding: 28px;
}

.enrollment-learning-overview {
  display: grid;
  grid-template-columns: minmax(190px, 28%) minmax(0, 1fr);
  overflow: hidden;
}

.enrollment-learning-overview__cover {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
}

.enrollment-learning-overview__content {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 20px;
  padding: 30px;
}

.enrollment-learning-overview__heading {
  align-items: flex-start;
}

.enrollment-learning-overview__action {
  width: fit-content;
}

@media (max-width: 720px) {
  .enrolled-course-card,
  .enrollment-learning-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .enrolled-course-card__media {
    min-height: 180px;
    max-height: 240px;
  }

  .enrollment-learning-overview__cover {
    min-height: 190px;
    max-height: 250px;
  }

  .enrolled-course-card__heading,
  .enrollment-learning-overview__heading,
  .enrolled-course-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .enrolled-course-card__actions,
  .enrollment-learning-overview__action {
    width: 100%;
  }

  .enrolled-course-card__actions .account-button {
    flex: 1;
  }

  .enrollment-learning-overview__content {
    padding: 22px;
  }
}

.account-page .storefront-pagination {
  margin: 22px 0 0;
  max-width: none;
  width: 100%;
}

.account-page .storefront-pagination__direction,
.account-page .storefront-pagination__page,
.account-page .storefront-pagination__ellipsis {
  min-height: 44px;
  min-width: 44px;
}

.account-modal {
  background: var(--surface-primary);
  border: 1px solid var(--border-muted);
  color: var(--text);
}

@media (max-width: 768px) {

  body.account-mobile-child .mobile-nav,
  body.auth-mobile-child .mobile-nav {
    display: none !important;
  }

  body.account-mobile-child,
  body.auth-mobile-child {
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  body.account-menu-route,
  body.auth-mobile-root {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  .account-menu-desktop,
  .account-page__desktop-breadcrumb,
  .account-page__desktop-header,
  .account-page__sidebar,
  .account-navigation--desktop {
    display: none !important;
  }

  .account-menu-mobile,
  .account-mobile-page-header {
    display: block;
  }

  .account-mobile-page-header {
    align-items: center;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-bottom: 1px solid var(--border-muted);
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    min-height: 58px;
    padding: 5px 12px;
    position: fixed;
    inset-inline: 0;
    top: var(--header-h, 72px);
    z-index: 1045;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .account-mobile-page-header__back {
    align-items: center;
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    color: var(--text);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    text-decoration: none;
    width: 44px;
  }

  .account-mobile-page-header__title {
    color: var(--text);
    font-size: 15px;
    font-weight: 750;
    margin: 0;
    overflow: hidden;
    padding-inline: 8px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [dir="rtl"] .account-mobile-page-header__back :where(i, svg),
  [dir="rtl"] .storefront-pagination__icon {
    transform: rotate(180deg);
  }

  .account-page--child {
    padding-top: 0;
  }

  .auth-mobile-child .auth-shell__inner {
    padding-top: 58px;
  }

  .account-page__container {
    max-width: none;
    padding: 16px 14px 36px;
  }

  .account-page--child .account-page__container {
    padding-top: 74px;
  }

  .account-page__layout {
    display: block;
    padding-top: 30px;
  }

  .account-page__content {
    min-width: 0;
    width: 100%;
  }

  .account-menu-mobile {
    min-height: calc(100dvh - var(--header-h, 72px));
    padding: 18px 14px 30px;
  }

  .account-menu-mobile__container {
    display: grid;
    gap: 18px;
    margin: 0 auto;
    max-width: 620px;
  }

  .account-menu-mobile.is-account-action-leaving .account-menu-mobile__container {
    animation: account-action-hub-out 180ms cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
  }

  body.account-menu-route.is-account-action-leaving .mobile-nav {
    animation: account-action-nav-out 180ms cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
  }

  .account-menu-mobile.is-account-action-restoring .account-menu-mobile__container {
    animation: account-action-hub-in 240ms cubic-bezier(.2, .8, .2, 1) both;
  }

  body.account-menu-route.account-action-restoring .mobile-nav {
    animation: account-action-nav-in 240ms cubic-bezier(.2, .8, .2, 1) both;
  }

  .account-mobile-page-header.is-account-action-leaving {
    animation: account-action-child-header-out 180ms cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
  }

  .account-page__container.is-account-action-leaving {
    animation: account-action-child-content-out 180ms cubic-bezier(.4, 0, 1, 1) both;
    pointer-events: none;
  }

  .account-menu-profile {
    align-items: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, var(--surface-primary)), var(--surface-primary));
    border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border-muted));
    border-radius: 20px;
    display: flex;
    gap: 15px;
    padding: 18px;
  }

  .account-menu-profile img {
    background: var(--surface-strong);
    border: 2px solid color-mix(in srgb, var(--accent) 40%, var(--border-muted));
    border-radius: 50%;
    flex: 0 0 62px;
    height: 62px;
    object-fit: cover;
    width: 62px;
  }

  .account-menu-profile span,
  .account-menu-profile p {
    color: var(--muted);
    font-size: 12px;
    margin: 0;
  }

  .account-menu-profile h1 {
    color: var(--text);
    font-size: 20px;
    margin: 2px 0 3px;
  }

  .account-menu-group h2 {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    margin: 0 0 8px 8px;
    text-transform: uppercase;
  }

  .account-menu-group__items {
    background: var(--surface-primary);
    border: 1px solid var(--border-muted);
    border-radius: 18px;
    overflow: hidden;
  }

  .account-menu-link {
    align-items: center;
    color: var(--text);
    display: grid;
    gap: 12px;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    min-height: 70px;
    padding: 10px 14px;
    text-decoration: none;
  }

  .account-menu-link+.account-menu-link {
    border-top: 1px solid var(--border-muted);
  }

  .account-menu-link__icon {
    align-items: center;
    background: color-mix(in srgb, var(--accent) 12%, var(--surface-primary));
    border-radius: 12px;
    color: var(--accent);
    display: inline-flex;
    height: 44px;
    justify-content: center;
    width: 44px;
  }

  .account-menu-link__copy {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .account-menu-link__copy strong {
    font-size: 14px;
  }

  .account-menu-link__copy small {
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-menu-link__chevron {
    color: var(--muted);
    font-size: 11px;
  }

  [dir="rtl"] .account-menu-link__chevron {
    transform: rotate(180deg);
  }

  .account-menu-link__badge {
    align-items: center;
    background: var(--accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 10px;
    font-weight: 800;
    justify-content: center;
    min-height: 22px;
    min-width: 22px;
    padding: 2px 6px;
  }

  .account-menu-logout button {
    align-items: center;
    background: var(--surface-primary);
    border: 1px solid var(--border-muted);
    border-radius: 16px;
    color: var(--danger, #d94b56);
    display: flex;
    font-weight: 750;
    gap: 12px;
    min-height: 54px;
    padding: 12px 18px;
    width: 100%;
  }

  .account-content-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .account-content-toolbar--end {
    align-items: stretch;
  }

  .account-content-toolbar .account-button,
  .account-content-toolbar .btn {
    justify-content: center;
    min-height: 48px;
    width: 100%;
  }

  .account-table-wrapper {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .account-responsive-table,
  .account-responsive-table tbody {
    display: block;
    width: 100%;
  }

  .account-responsive-table thead {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .account-responsive-table tbody {
    display: grid;
    gap: 12px;
  }

  .account-responsive-table tbody tr {
    background: var(--surface-primary);
    border: 1px solid var(--border-muted);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: grid;
    overflow: hidden;
    padding: 7px 14px;
  }

  .account-responsive-table tbody td {
    align-items: flex-start;
    border-bottom: 1px solid var(--border-muted);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(90px, 38%) minmax(0, 1fr);
    overflow-wrap: anywhere;
    padding: 12px 0;
    text-align: end;
  }

  .account-responsive-table tbody td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .055em;
    text-align: start;
    text-transform: uppercase;
  }

  .account-responsive-table tbody tr:not(.account-table-empty) td:last-child {
    border-bottom: 0;
  }

  .account-responsive-table tbody tr.account-table-empty {
    padding: 0;
  }

  .account-responsive-table tbody tr.account-table-empty td {
    border: 0;
    display: block;
    padding: 12px;
    text-align: start;
  }

  .account-responsive-table tbody tr.account-table-empty td::before {
    display: none;
  }

  .account-table-actions,
  .history-table-actions {
    justify-content: flex-end;
  }

  .account-order-card__actions-cell {
    display: block !important;
    text-align: start !important;
  }

  .account-order-card__actions-cell::before {
    display: block;
    margin-bottom: 10px;
  }

  .account-order-card .account-table-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .account-order-card .account-order-primary-action {
    min-height: 48px;
    width: 100%;
  }

  .account-order-card .account-order-invoice-action {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  .account-page .storefront-pagination {
    margin: 18px 0 0 !important;
  }

  .account-page .storefront-pagination__summary,
  .account-page .storefront-pagination__pages {
    display: none;
  }

  .account-page .storefront-pagination__controls {
    display: grid;
    gap: 10px;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    width: 100%;
  }

  .account-page .storefront-pagination__direction {
    font-size: 0;
    height: 48px;
    min-height: 48px;
    min-width: 48px;
    padding: 0;
    width: 48px;
  }

  .account-page .storefront-pagination__direction-label {
    display: none;
  }

  .account-page .storefront-pagination__status {
    align-items: center;
    border: 1px solid var(--border-muted);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    min-height: 48px;
  }

  .account-settings-content .row>[class*="col-"] {
    width: 100%;
  }

  .account-settings-content .settings-card,
  .notifications-inbox-card {
    padding: 18px !important;
  }

  .notifications-inbox-list .list-group-item>.d-flex {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px !important;
  }
}

/* Theme-safe controls for every account surface introduced by the shared shell. */
.account-page :where(input.form-control,
  textarea.form-control,
  select.form-control,
  select.form-select,
  .account-control) {
  background-color: var(--surface-primary) !important;
  border-color: var(--border-muted) !important;
  caret-color: var(--accent);
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.account-page :where(input.form-control, textarea.form-control, .account-control)::placeholder {
  color: var(--muted-light) !important;
  opacity: 1;
  -webkit-text-fill-color: var(--muted-light) !important;
}

.account-page :where(input.form-control,
  textarea.form-control,
  select.form-control,
  select.form-select,
  .account-control):focus {
  background-color: var(--surface-primary) !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

.account-page :where(input.form-control, textarea.form-control, .account-control):-webkit-autofill,
.account-page :where(input.form-control, textarea.form-control, .account-control):-webkit-autofill:hover,
.account-page :where(input.form-control, textarea.form-control, .account-control):-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--surface-primary) inset !important;
  caret-color: var(--accent) !important;
  -webkit-text-fill-color: var(--text) !important;
  transition: background-color 9999s ease-out 0s;
}

.account-page :where(input.form-control, textarea.form-control, select.form-control, select.form-select, .account-control):disabled,
.account-page :where(input.form-control, textarea.form-control, select.form-control, select.form-select, .account-control)[readonly] {
  background-color: var(--surface-strong) !important;
  color: var(--muted) !important;
  opacity: .78;
  -webkit-text-fill-color: var(--muted) !important;
}

.account-page :where(select.form-control, select.form-select) option {
  background: var(--surface-primary);
  color: var(--text);
}

@media (max-width: 768px) {

  html:has(body.auth-mobile-root),
  body.auth-mobile-root {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.auth-mobile-root {
    min-height: 100dvh !important;
    padding-bottom: 0 !important;
  }

  body.auth-mobile-root #app {
    flex: 0 0 calc(100dvh - var(--header-h, 72px) - var(--mobile-nav-h, 76px));
    height: calc(100dvh - var(--header-h, 72px) - var(--mobile-nav-h, 76px));
    min-height: 0;
    overflow: hidden;
  }

  .auth-mobile-root .auth-shell,
  .auth-mobile-root .auth-shell__inner,
  .auth-mobile-root .auth-shell .auth-wrapper,
  .auth-mobile-root .auth-shell .auth-wrapper.min-vh-100 {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .auth-mobile-root .auth-shell .auth-wrapper {
    padding: 12px 14px;
  }

  .auth-mobile-root .auth-shell .container,
  .auth-mobile-root .auth-shell .row,
  .auth-mobile-root .auth-shell [class*="col-"] {
    max-height: 100%;
  }

  .auth-mobile-root .auth-shell .auth-box {
    max-height: 100%;
    padding: clamp(16px, 3.2dvh, 24px) 18px;
  }

  .auth-mobile-root .auth-logo {
    height: 34px;
    margin-bottom: 14px;
  }

  .auth-mobile-root .auth-title {
    font-size: clamp(21px, 6.4vw, 28px);
  }

  .auth-mobile-root .auth-text {
    font-size: 14px;
    line-height: 1.5;
  }
}

@media (max-width: 768px) and (max-height: 720px) {
  html:has(body.auth-mobile-root),
  body.auth-mobile-root {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body.auth-mobile-root {
    min-height: 100dvh !important;
    padding-bottom: 0 !important;
  }

  body.auth-mobile-root #app {
    height: calc(100dvh - var(--header-h, 72px) - var(--mobile-nav-h, 76px));
    max-height: calc(100dvh - var(--header-h, 72px) - var(--mobile-nav-h, 76px));
    min-height: 0;
    flex: 0 0 calc(100dvh - var(--header-h, 72px) - var(--mobile-nav-h, 76px));
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }

  .auth-mobile-root .auth-shell,
  .auth-mobile-root .auth-shell__inner,
  .auth-mobile-root .auth-shell .auth-wrapper,
  .auth-mobile-root .auth-shell .auth-wrapper.min-vh-100 {
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  .auth-mobile-root .auth-shell .auth-wrapper {
    padding-block: 16px 28px;
  }

  .auth-mobile-root .auth-shell .container,
  .auth-mobile-root .auth-shell .row,
  .auth-mobile-root .auth-shell [class*="col-"],
  .auth-mobile-root .auth-shell .auth-box {
    max-height: none;
  }

  .auth-mobile-root .auth-shell .row.h-100 {
    height: auto !important;
  }
}

@keyframes account-action-hub-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-8px) scale(.992);
  }
}

@keyframes account-action-nav-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(calc(100% + env(safe-area-inset-bottom)));
  }
}

@keyframes account-action-hub-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.992);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes account-action-nav-in {
  from {
    opacity: 0;
    transform: translateY(calc(100% + env(safe-area-inset-bottom)));
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes account-action-child-header-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes account-action-child-content-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: reduce) {

  .account-menu-mobile.is-account-action-leaving .account-menu-mobile__container,
  .account-menu-mobile.is-account-action-restoring .account-menu-mobile__container,
  body.account-menu-route.is-account-action-leaving .mobile-nav,
  body.account-menu-route.account-action-restoring .mobile-nav,
  .account-mobile-page-header.is-account-action-leaving,
  .account-page__container.is-account-action-leaving {
    animation-duration: .01ms !important;
  }
}
