.account-page main { min-height: 54vh; }
.account-hero { padding: 48px var(--ds-page-gutter) 28px; background: var(--ds-color-canvas); }
.account-hero h1 { font-family: var(--ds-font-display); font-size: var(--ds-font-size-h1); font-weight: var(--ds-font-weight-medium); line-height: var(--ds-line-height-tight); text-transform: uppercase; }
.account-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; max-width: calc(var(--ds-container-max) + 2 * var(--ds-page-gutter)); margin-inline: auto; padding: 16px 0 var(--ds-section-space-bottom); background: var(--ds-color-canvas); }
.account-nav { border-top: 2px solid var(--ds-color-text); }
.account-nav__button { display: flex; width: 100%; min-height: 48px; align-items: center; padding: 12px 0; border: 0; border-bottom: 1px solid var(--ds-color-border); background: transparent; color: var(--ds-color-text); cursor: pointer; font: inherit; font-size: var(--ds-font-size-md); text-align: left; }
.account-nav__button[aria-selected="true"] { color: var(--ds-color-brand); font-weight: var(--ds-font-weight-semibold); }
.account-nav__button--exit { margin-top: 18px; border-top: 1px solid var(--ds-color-border); }
.account-panel { max-width: 860px; }
.account-panel[hidden] { display: none; }
.account-panel h2 { margin-bottom: 12px; font-family: var(--ds-font-display); font-size: clamp(30px, 4vw, 42px); font-weight: var(--ds-font-weight-medium); line-height: 1.12; }
.account-intro, .account-note { color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: var(--ds-line-height-body); }
.account-prototype-note { margin: 24px 0 28px; padding: 14px 16px; border-left: 3px solid var(--color-orange); background: rgba(255,255,255,.36); color: var(--ds-color-text-muted); font-size: var(--ds-font-size-md); line-height: 1.5; }
.order-list { border-top: 1px solid var(--ds-color-border); }
.account-order { padding: 24px 0; border-bottom: 1px solid var(--ds-color-border); }
.account-order__head, .account-order__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.account-order__number { font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-semibold); }
.account-order__status { padding: 5px 10px; border: 1px solid var(--ds-color-border); border-radius: var(--ds-radius-pill); font-size: var(--ds-font-size-sm); font-weight: var(--ds-font-weight-semibold); }
.account-order__status--route { border-color: var(--color-orange); background: var(--color-orange); color: var(--ds-color-text-inverse); }
.account-order__products { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 16px; }
.account-order__book { display: grid; grid-template-columns: 48px auto; gap: 10px; align-items: center; font-size: var(--ds-font-size-md); }
.account-order__book img { width: 48px; height: 66px; object-fit: cover; background: var(--ds-color-surface-muted); }
.account-order__meta { justify-content: flex-start; color: var(--ds-color-text-muted); font-size: var(--ds-font-size-md); line-height: 1.5; }
.account-order .ds-button { margin-top: 18px; }
.account-page .ds-button:not(.ds-button--secondary) { color: var(--ds-color-text-inverse); }
.account-form { display: grid; max-width: 570px; gap: 18px; margin-top: 28px; }
.address-list { display: grid; gap: 16px; margin-top: 28px; }
.address-item { padding: 20px 0; border-top: 1px solid var(--ds-color-border); }
.address-item:last-child { border-bottom: 1px solid var(--ds-color-border); }
.address-item h3 { margin-bottom: 6px; font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-semibold); }
.address-item p { color: var(--ds-color-text-muted); font-size: var(--ds-font-size-title); font-weight: var(--ds-font-weight-medium); line-height: 1.5; }
.account-status { min-height: 24px; margin-top: 16px; color: var(--ds-color-brand); font-size: var(--ds-font-size-md); line-height: 1.5; }

/* --------------------------------------------------------------------------
   Страница входа, регистрации и восстановления пароля (Login / Register)
   -------------------------------------------------------------------------- */
.login-section {
  padding: clamp(32px, 5vw, 64px) var(--ds-page-gutter) var(--ds-section-space-bottom);
  background: var(--ds-color-canvas);
  min-height: calc(100vh - 420px);
}

.login-layout {
  display: grid;
  max-width: 520px;
  gap: 20px;
  margin-inline: auto;
}

.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg, 16px);
  box-shadow: 0 10px 32px rgba(35, 30, 19, 0.08);
  padding: clamp(28px, 5vw, 44px);
  box-sizing: border-box;
}

.login-card__header {
  margin-bottom: 24px;
}

.login-card__title {
  margin: 0 0 10px;
  font-family: var(--ds-font-display);
  font-size: clamp(26px, 4vw, 36px);
  font-weight: var(--ds-font-weight-medium);
  line-height: var(--ds-line-height-tight);
  text-transform: uppercase;
  color: var(--color-brown, #2c251d);
  text-wrap: balance;
}

.login-card__subtitle {
  margin: 0;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-md);
  line-height: 1.55;
  text-wrap: pretty;
}

.login-form {
  display: grid;
  gap: 20px;
}

.ds-field-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.ds-field-head .ds-label {
  margin-bottom: 0;
}

.login-forgot-link {
  color: var(--ds-color-brand);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ds-transition-fast), text-decoration-color var(--ds-transition-fast);
}

.login-forgot-link:hover {
  color: var(--color-brown, #2c251d);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-forgot-link:focus-visible {
  outline: 2px solid var(--ds-color-focus);
  outline-offset: 2px;
  border-radius: 2px;
}

.ds-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.ds-password-wrap .ds-input {
  width: 100%;
  padding-right: 46px;
}

.ds-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ds-color-text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: color var(--ds-transition-fast), background var(--ds-transition-fast);
}

.ds-password-toggle:hover {
  color: var(--ds-color-text);
  background: rgba(35, 30, 19, 0.05);
}

.ds-password-toggle:focus-visible {
  outline: 2px solid var(--ds-color-focus);
  outline-offset: 2px;
}

.login-field-hint {
  margin: 6px 0 0;
  font-size: var(--ds-font-size-xs, 12px);
  color: var(--ds-color-text-muted);
  line-height: 1.4;
}

.login-submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-semibold);
  letter-spacing: 0.01em;
}

.login-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 2px;
  text-align: center;
}

.login-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--ds-color-border);
}

.login-divider span {
  position: relative;
  padding: 0 16px;
  background: #fff;
  border-radius: 999px;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-medium);
  line-height: 1;
}

.login-switch-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.login-switch-text {
  margin: 0;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-sm);
  font-weight: var(--ds-font-weight-medium);
}

.login-switch-btn {
  width: 100%;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ds-font-size-md);
  font-weight: var(--ds-font-weight-medium);
}

.login-guest-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--ds-radius-md, 12px);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--ds-color-border);
  box-sizing: border-box;
}

.login-guest-box__icon {
  flex-shrink: 0;
  color: var(--ds-color-brand);
  margin-top: 1px;
}

.login-guest-box__text {
  margin: 0;
  color: var(--ds-color-text-muted);
  font-size: var(--ds-font-size-sm);
  line-height: 1.55;
}

.account-text-button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--ds-color-brand); cursor: pointer; font: inherit; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.login-guest-note { padding-top: 20px; border-top: 1px solid var(--ds-color-border); color: var(--ds-color-text-muted); font-size: var(--ds-font-size-md); line-height: 1.55; }
.account-nav__button:focus-visible, .account-text-button:focus-visible { outline: 3px solid var(--ds-color-focus); outline-offset: 3px; }

@media (max-width: 1024px) {
  .account-hero { text-align: center; }
  .account-layout { grid-template-columns: 1fr; gap: 30px; padding: 20px 0 var(--ds-section-space-bottom); }
  .account-nav { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-top: 1px solid var(--ds-color-border); }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav__button { width: auto; flex: 0 0 auto; padding: 12px 16px; border-bottom: 2px solid transparent; white-space: nowrap; }
  .account-nav__button[aria-selected="true"] { border-bottom-color: var(--ds-color-brand); }
  .account-nav__button--exit { margin-top: 0; border-top: 0; }
  .account-prototype-note { text-align: center; }
  .account-panel { margin-inline: auto; text-align: center; }
  .account-order__head, .account-order__meta { justify-content: center; }
  .account-order__products { justify-content: center; }
  .account-form { margin-inline: auto; text-align: center; }
  .account-note { margin-inline: auto; }
}

@media (max-width: 480px) {
  .account-hero { padding: 32px var(--ds-page-gutter) 20px; }
  .login-section { padding-top: 24px; }
  .login-card { padding: 24px 18px; }
  .login-card__title { font-size: 24px; }
  .login-form .ds-button, .account-form .ds-button, .account-order .ds-button { width: 100%; }
}
