.account-page {
  min-height: 100svh;
  background: var(--paper);
}

.account-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 124px 0 80px;
}

.account-copy,
.account-loading {
  max-width: 680px;
  margin-bottom: 26px;
}

.account-copy h1,
.account-loading h1,
.account-dashboard-head h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1;
}

.account-copy p,
.account-dashboard-head p,
.account-status,
.account-help {
  color: var(--muted);
  line-height: 1.5;
}

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

.account-layout {
  grid-template-columns: 1fr;
}

.account-accordion {
  align-items: start;
}

.account-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  overflow: hidden;
}

.account-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 950;
  letter-spacing: .04em;
  list-style: none;
}

.account-section summary::-webkit-details-marker {
  display: none;
}

.account-section summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.account-section[open] summary::after {
  transform: rotate(225deg);
}

.account-section-body {
  display: grid;
  gap: 18px;
  padding: 0 18px 18px;
}

.account-data-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.account-card h2 {
  margin: 0 0 18px;
}

.account-card h3 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.account-card label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  font-weight: 800;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(110px, .35fr) minmax(0, 1fr);
  gap: 12px;
}

.phone-row label {
  margin-bottom: 12px;
}

.account-card input,
.account-card select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
}

.cart-page-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr);
  align-items: start;
  gap: 18px;
}

.cart-checkout-stack {
  display: grid;
  gap: 18px;
}

.checkout-address-form {
  display: grid;
  gap: 14px;
}

.checkout-address-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.checkout-address-grid label {
  margin: 0;
}

.checkout-address-grid label:nth-child(3) {
  grid-column: 1 / -1;
}

.checkout-address-form .secondary-action {
  justify-self: start;
  min-height: 42px;
  border-radius: 6px;
  background: #181816;
  color: var(--white);
}

.checkout-address-summary {
  display: grid;
  gap: 14px;
}

.checkout-address-lines {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.checkout-address-lines strong {
  font-size: 1.02rem;
}

.checkout-address-summary > .secondary-action {
  justify-self: start;
  min-height: 42px;
  border-radius: 6px;
  background: #181816;
  color: var(--white);
}

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(16, 17, 20, .54);
}

.checkout-modal-panel {
  position: relative;
  width: min(760px, 100%);
  max-height: min(86svh, 820px);
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 28px 90px rgba(16, 17, 20, .28);
}

.checkout-modal-panel h2 {
  margin: 0 0 10px;
}

.checkout-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #ece8df;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.2rem;
}

.checkout-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr 44px;
}

.password-field input {
  border-radius: 6px 0 0 6px;
  border-right: 0;
  min-width: 0;
}

.password-field button {
  align-items: center;
  background: #f6f5f1;
  border: 1px solid var(--line);
  border-radius: 0 6px 6px 0;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 0;
}

.password-field .material-icons {
  font-size: 22px;
}

.account-reset-card {
  max-width: 520px;
}

.account-help {
  margin: -6px 0 16px;
  font-size: .95rem;
}

.account-password-form {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 20px;
}

.text-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  margin-top: 12px;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
}

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

.account-dashboard-head [data-logout] {
  background: #181816;
  border-color: #181816;
  color: var(--white);
}

.account-complete-notice {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: min(680px, 100%);
  margin: 0 auto 24px;
  padding: 22px;
  border: 1px solid #d8b24a;
  border-radius: 10px;
  background: #fff7d8;
  color: #181816;
  text-align: center;
  box-shadow: 0 18px 44px rgba(16, 17, 20, 0.12);
}

.account-complete-notice[hidden] {
  display: none;
}

.account-complete-notice strong {
  font-size: 1.22rem;
}

.account-complete-notice p {
  max-width: 520px;
  margin: 0;
  color: #5b4b18;
  line-height: 1.45;
}

.account-complete-notice button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: #181816;
  color: var(--white);
  font-weight: 850;
  cursor: pointer;
}

.account-list {
  display: grid;
  gap: 10px;
}

.payment-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.payment-choice-card {
  appearance: none;
  display: grid;
  grid-template-rows: minmax(120px, 1fr) auto;
  justify-items: center;
  gap: 10px;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #faf9f6;
  color: var(--ink);
  cursor: pointer;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.payment-choice-card:hover,
.payment-choice-card.is-selected {
  border-color: var(--ink);
  box-shadow: 0 10px 28px rgba(24, 24, 22, .12);
}

.payment-choice-card.is-selected {
  transform: translateY(-1px);
}

.payment-choice-media {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: min(120px, 100%);
  aspect-ratio: 1;
  border-radius: 6px;
  background: #ece8df;
}

.payment-choice-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.payment-choice-media .material-icons {
  font-size: 34px;
}

.payment-choice-copy {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.payment-choice-copy strong,
.payment-choice-copy span,
.payment-choice-copy small {
  display: block;
}

.payment-choice-copy small {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
  max-width: 100%;
  text-align: center;
}

.checkout-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
  font-weight: 800;
}

.checkout-toggle-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.checkout-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.checkout-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.checkout-form textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 104px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  line-height: 1.45;
}

.checkout-form .checkout-button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.checkout-total-lines {
  display: grid;
  gap: 8px;
}

.checkout-total-lines > div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.checkout-total-lines > div:last-child {
  border-bottom: 0;
}

.checkout-total-lines .is-total {
  margin-top: 4px;
  padding: 14px 12px;
  border-radius: 8px;
  background: #181816;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 950;
}

.order-success-card {
  max-width: 760px;
  margin: 0 auto;
}

.order-success-card h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
}

.order-success-summary {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 16px;
  border-radius: 8px;
  background: #faf9f6;
}

.order-success-summary p {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: 0;
  color: var(--muted);
}

.order-success-summary b {
  color: var(--ink);
}

.order-success-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.account-row {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9f6;
}

.account-row strong,
.account-row span {
  display: block;
}

.account-row p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.account-order-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf9f6;
}

.account-order-card[open] {
  background: #fbfaf7;
}

.account-order-head,
.account-order-items > div {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.account-order-head {
  cursor: pointer;
  list-style: none;
}

.account-order-head::-webkit-details-marker {
  display: none;
}

.account-order-head::before {
  content: "expand_more";
  align-self: center;
  color: var(--muted);
  font-family: "Material Icons";
  font-size: 24px;
  line-height: 1;
}

.account-order-card[open] .account-order-head::before {
  content: "expand_less";
}

.account-order-head strong,
.account-order-head span {
  display: block;
}

.account-order-head span,
.account-order-items span,
.account-status-grid span,
.account-status-note {
  color: var(--muted);
}

.account-order-items {
  display: grid;
  gap: 8px;
}

.account-order-items > div {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.account-order-items img {
  width: 58px;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: contain;
  background: #ece8df;
}

.account-order-status {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--white);
}

.account-order-status h3 {
  margin: 0;
  font-size: .88rem;
  letter-spacing: .08em;
}

.account-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-status-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9f6;
}

.account-tracking-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 6px;
  background: #181816;
  color: var(--white);
}

.account-tracking-box p,
.account-status-note {
  margin: 0;
  line-height: 1.45;
}

.account-tracking-box a {
  color: var(--white);
  font-weight: 900;
  text-underline-offset: 4px;
}

.account-cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto 30px;
  gap: 12px;
  align-items: center;
}

.account-cart-item img {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 6px;
  object-fit: contain;
  background: #ece8df;
}

.account-cart-item button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: #ece8df;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.1rem;
}

.account-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.account-status.is-error {
  color: #782817;
}

.account-status.is-success {
  color: #126b3a;
}

.message-toggle {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.message-toggle strong {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #b62020;
  color: #fff;
  font-size: 0.7rem;
}

.account-message-list,
.account-message-form {
  display: grid;
  gap: 10px;
}

.account-message-form {
  margin-top: 14px;
}

.account-message-form textarea {
  min-height: 96px;
}

.account-message {
  display: grid;
  gap: 8px;
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f2f0ea;
}

.account-message.is-user {
  justify-self: end;
  background: var(--ink);
  color: #fff;
}

.account-message img {
  max-width: min(260px, 100%);
  border-radius: 8px;
}

.account-page .account-message-form textarea {
  min-height: 126px;
  border: 1px solid #e7e2d8;
  border-radius: 8px;
  padding: 16px;
  background: #fffefa;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.account-page .account-message {
  border-radius: 18px;
  background: #e5e5ea;
  color: #111;
  box-shadow: 0 1px 1px rgba(20, 30, 45, 0.08);
}

.account-page .account-message.is-user {
  justify-self: end;
  background: #007aff;
  color: #fff;
}

.account-page .account-message small {
  color: #667085;
}

.account-page .account-message.is-user small {
  color: rgba(255, 255, 255, 0.72);
}

.account-page .site-client-chat-actions {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.account-page .site-client-attach-button {
  display: grid;
  height: 58px;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: #0084ff;
  color: #fff;
  cursor: pointer;
}

.account-page .site-client-attach-button input {
  display: none;
}

.account-page .site-client-attach-button .material-icons {
  font-size: 2rem;
  transform: rotate(-35deg);
}

.account-page .site-client-chat-actions .checkout-button {
  width: 100%;
  min-height: 58px;
  font-weight: 900;
}

.message-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  justify-content: start;
  background: rgba(16, 17, 20, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.message-drawer.open {
  opacity: 1;
  pointer-events: auto;
}

.message-panel {
  width: min(420px, 92vw);
  min-height: 100vh;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 24px;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.22s ease;
  box-shadow: 18px 0 40px rgba(16, 17, 20, 0.18);
}

.message-drawer.open .message-panel {
  transform: translateX(0);
}

@media (max-width: 860px) {
  .account-auth-grid,
  .account-layout,
  .cart-page-layout,
  .account-data-grid,
  .phone-row,
  .checkout-address-grid {
    grid-template-columns: 1fr;
  }

  .checkout-address-grid label:nth-child(3) {
    grid-column: auto;
  }

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

  .account-cart-item {
    grid-template-columns: 58px 1fr 30px;
  }

  .account-cart-item b {
    grid-column: 2 / 3;
  }

  .account-status-grid {
    grid-template-columns: 1fr;
  }

  .account-order-head,
  .account-order-items > div {
    align-items: stretch;
    gap: 8px;
  }

  .account-order-items > div {
    grid-template-columns: 50px minmax(0, 1fr);
  }

  .account-order-items b {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .account-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 104px;
  }

  .account-card {
    padding: 16px;
  }

  .order-success-actions {
    grid-template-columns: 1fr;
  }

  .payment-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .payment-choice-card {
    min-height: 152px;
    padding: 10px;
  }

  .payment-choice-media {
    width: min(96px, 100%);
  }
}

.bug-report-button {
  width: 100%;
  margin: 12px 0;
  justify-content: center;
  border-color: #0a84ff;
  color: #0a4fa3;
  font-weight: 900;
}

.bug-status-pill,
.bug-status-admin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e7f1ff;
  color: #0a4fa3;
  font-size: .78rem;
  font-weight: 900;
}

.bug-status-admin select {
  min-height: 30px;
  border: 1px solid #9ec7ff;
  border-radius: 999px;
  padding: 0 8px;
  background: #fff;
  color: #0a4fa3;
  font-weight: 800;
}

.coupon-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.coupon-form p {
  grid-column: 1 / -1;
}

@media (max-width: 520px) {
  .coupon-form {
    grid-template-columns: 1fr;
  }
}
