/* ---------- Вход, регистрация, восстановление пароля ---------- */

.auth-card {
  max-width: 440px;
  margin: 24px auto 48px;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background-color: var(--bg);
}

.auth-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.auth-help {
  color: var(--ink-2);
  font-size: 13px;
}

.auth-help ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.auth-lead {
  color: var(--ink-2);
  font-size: 15px;
}

.auth-hint {
  margin: 14px 0 0;
  font-size: 14px;
  text-align: center;
}

.auth-hint a {
  text-decoration: underline;
}

.auth-hint--muted {
  color: var(--ink-2);
  font-size: 13px;
}

/* ---------- Личный кабинет ---------- */

.profile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.profile-logout {
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: underline;
}

.profile-logout:hover {
  color: var(--ink);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-form .auth-fields {
  margin-bottom: 0;
}

/* ---------- История заказов ---------- */

.order-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.order-history__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-history__item[open] {
  border-color: var(--ink-2);
}

.order-history__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

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

.order-history__number {
  font-weight: 600;
}

.order-history__date {
  color: var(--ink-2);
  font-size: 14px;
}

.order-history__total {
  margin-left: auto;
  font-weight: 600;
  white-space: nowrap;
}

.order-history__item > :not(summary) {
  margin: 0 16px 12px;
}

.order-history__lines {
  padding-top: 4px;
}

/* Строка товара в заказе — ссылка на страницу товара */
.order-history__line {
  margin: -6px;
  padding: 6px;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.order-history__line:hover,
.order-history__line:focus-visible {
  background-color: var(--bg-soft);
  color: inherit;
}

.order-history__line:hover .checkout-line__name,
.order-history__line:focus-visible .checkout-line__name {
  color: var(--accent);
}

.order-status {
  padding: 2px 10px;
  border-radius: 999px;
  background-color: var(--bg-soft);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
}

.order-status--paid,
.order-status--shipped {
  color: var(--ink);
}

.order-status--cancelled {
  color: var(--accent);
}

@media (max-width: 640px) {
  .auth-card {
    margin-top: 8px;
    padding: 20px 16px;
  }
}
