.account-main {
  flex: 1;
}

.account-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 82px;
}

.account-back-link {
  color: var(--accent-strong);
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
  text-decoration: none;
}

.account-back-link:hover,
.account-back-link:focus {
  text-decoration: underline;
}

.account-auth,
.account-dashboard {
  background: #fffdf4;
  border: 1px solid #ded5b6;
  border-radius: 8px;
  box-shadow: 0 28px 60px rgba(23, 37, 31, 0.14);
  padding: clamp(22px, 4vw, 38px);
}

.account-auth {
  display: grid;
  grid-template-columns: minmax(280px, 0.45fr) minmax(0, 0.55fr);
  overflow: hidden;
  padding: 0;
}

.account-heading,
.account-dashboard-header {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.account-auth .account-heading {
  align-content: start;
  background:
    linear-gradient(145deg, rgba(16, 36, 29, 0.96) 0%, rgba(23, 56, 44, 0.95) 56%, rgba(49, 45, 32, 0.95) 100%),
    url("/store/assets/legacy/shop-hero-bg.jpg") center 55% / cover;
  margin: 0;
  min-height: 460px;
  padding: clamp(28px, 4vw, 46px);
}

.account-dashboard-header {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) auto;
}

.account-kicker {
  color: #497d36;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.account-auth .account-kicker {
  color: var(--site-amber);
}

.account-heading h1,
.account-dashboard h1 {
  color: var(--deep);
  font-size: clamp(2.35rem, 5vw, 4.2rem);
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

.account-auth .account-heading h1 {
  color: #fffdf4;
  font-family: var(--site-display-font);
  font-size: clamp(2.8rem, 5vw, 5rem);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.account-dashboard h1 {
  font-size: clamp(1.85rem, 2.5vw, 2.75rem);
  line-height: 1.05;
}

.account-heading p,
.account-dashboard-header p,
.account-panel p {
  color: var(--muted);
  margin: 0;
}

.account-auth .account-heading > p:not(.account-kicker) {
  color: rgba(255, 253, 244, 0.84);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.5;
  max-width: 330px;
}

.account-benefits {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.account-benefits span {
  border: 1px solid rgba(255, 253, 244, 0.24);
  border-radius: 8px;
  color: #fffdf4;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 7px 10px;
  text-transform: uppercase;
}

.account-auth-panel {
  align-content: start;
  display: grid;
  min-height: 460px;
  padding: clamp(28px, 4vw, 44px);
}

.account-password-panel,
.account-recovery-panel {
  margin-bottom: 20px;
}

.account-recovery-generate-form {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 16px;
}

.account-recovery-generate-form .account-secondary-btn {
  min-height: 50px;
}

.account-recovery-receipt {
  background: #f7f2dc;
  border: 1px solid #d8cfad;
  border-radius: 8px;
  margin-top: 18px;
  padding: 16px;
}

.account-recovery-receipt[hidden],
.account-recovery-panel[hidden],
.account-grid[hidden],
.account-orders-panel[hidden] {
  display: none !important;
}

.account-recovery-receipt > p {
  color: var(--deep);
  line-height: 1.5;
}

.account-recovery-code-list {
  display: grid;
  gap: 8px 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
  padding-left: 28px;
}

.account-recovery-code-list code {
  color: var(--deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.account-recovery-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.account-tabs {
  background: #eee6c9;
  border: 1px solid #d8cfad;
  border-radius: 8px;
  display: grid;
  gap: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 4px;
  width: 100%;
}

.account-tab,
.account-secondary-btn,
.account-secondary-link {
  align-items: center;
  background: #ffffff;
  border: 1px solid #d7cfad;
  border-radius: 8px;
  color: var(--deep);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  text-transform: uppercase;
}

.account-tab {
  background: transparent;
  border: 0;
  min-height: 44px;
  white-space: nowrap;
}

.account-tab.is-active,
.account-secondary-btn:hover,
.account-secondary-btn:focus,
.account-secondary-link:hover,
.account-secondary-link:focus {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #ffffff;
  text-decoration: none;
}

.account-tab.is-active {
  box-shadow: 0 10px 24px rgba(102, 168, 72, 0.25);
}

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

.account-form[hidden],
.account-tabs[hidden],
.account-auth[hidden],
.account-dashboard[hidden] {
  display: none !important;
}

.account-form-heading {
  display: grid;
  gap: 7px;
}

.account-form-heading h2 {
  color: var(--deep);
  font-size: 1.35rem;
  margin: 0;
}

.account-form-heading p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.account-inline-action {
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--accent-strong);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  justify-self: center;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-inline-action:hover,
.account-inline-action:focus {
  color: var(--deep);
  outline: none;
}

.account-form label {
  color: var(--deep);
  display: grid;
  font-size: 0.9rem;
  font-weight: 800;
  gap: 7px;
  text-transform: none;
}

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

#account-password-form {
  max-width: 640px;
  width: 100%;
}

#account-password-form .account-secondary-btn {
  justify-self: start;
  width: auto;
}

#account-password-form .account-secondary-btn:disabled {
  cursor: wait;
  opacity: 0.68;
}

.account-password-status {
  justify-self: start;
  margin: 0;
}

.account-form input {
  background: #ffffff;
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  min-height: 50px;
  padding: 11px 14px;
  text-transform: none;
}

.account-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(244, 181, 28, 0.2);
  outline: none;
}

.account-auth-panel .hero-btn {
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  min-height: 50px;
  width: 100%;
}

.account-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
}

.account-panel {
  background: #ffffff;
  border: 1px solid #ded5b6;
  border-radius: 8px;
  padding: 18px;
}

.account-panel h2 {
  color: var(--deep);
  font-size: 1.05rem;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

.account-panel-header h2 {
  margin: 0;
}

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

.account-orders-panel {
  margin-top: 18px;
}

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

.account-order {
  border: 1px solid rgba(23, 37, 31, 0.12);
  border-radius: 8px;
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

.account-order strong {
  color: var(--deep);
}

.account-order span,
.account-order p {
  color: var(--muted);
  margin: 0;
}

.account-order-status {
  background: rgba(102, 168, 72, 0.12);
  border-radius: 999px;
  color: #497d36;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 5px 9px;
  text-transform: uppercase;
}

.account-status {
  color: var(--muted);
  margin: 16px 0 0;
}

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

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

.account-status.is-success {
  color: #497d36;
}

@media (max-width: 760px) {
  .account-shell {
    width: min(100% - 24px, 560px);
    padding: 28px 0 64px;
  }

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

  .account-auth .account-heading,
  .account-auth-panel {
    min-height: auto;
    padding: 24px;
  }

  .account-auth .account-heading h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .account-tab {
    font-size: 0.8rem;
    padding: 0 8px;
  }

  .account-dashboard-header,
  .account-grid,
  .account-form-row,
  .account-field-row,
  .account-recovery-generate-form,
  .account-recovery-code-list {
    grid-template-columns: 1fr;
  }

  .account-panel-header,
  .account-order-row {
    align-items: stretch;
    flex-direction: column;
  }

  .account-tab,
  .account-secondary-btn,
  .account-secondary-link {
    width: 100%;
  }

  .account-recovery-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .account-recovery-code-list code {
    font-size: 0.74rem;
  }
}
