/* Личный кабинет — общий каркас, сайдбар, панель, дашборд
   (Figma 1:22186 desktop, 1:22398 mobile) */

:root {
  --acc-border: #e6e6e6;
  --acc-yellow: #ffcb05;
  --acc-yellow-bg: #fffde6;
  --acc-teal: #2ec4b6;
  --acc-teal-bg: #e6f9f6;
  --acc-gray-bg: #f5f5f5;
  --acc-title: #111827;
  --acc-link: #005b9e;
  --acc-muted: #6b757d;
  --acc-row-bg: #f8f9fa;
  --acc-divider: #e5e6e8;
}

/* ── Каркас: сайдбар + панель ─────────────────────────────── */

.account {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 80px;
}

/* ── Навигация ЛК (partials/account-nav.html) ─────────────── */

.account-nav {
  flex: 0 0 280px;
  min-width: 0;
}

.account-nav__sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-white);
  border: 1px solid var(--acc-border);
  border-radius: 16px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.04));
}

.account-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  font-weight: var(--fw-medium);
  font-size: 14px;
  color: var(--text-gray-600);
}

.account-nav__item:hover {
  background: rgba(0, 0, 0, 0.08);
}

.account-nav__item.is-active {
  background: var(--acc-yellow);
  color: var(--text-black);
}

.account-nav__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.account-nav__item.is-active .account-nav__icon img {
  filter: brightness(0);
}

/* Мобильные табы-чипсы (Figma 1:21316) */
.account-nav__tabs {
  display: none;
}

/* ── Панель контента ──────────────────────────────────────── */

.account-panel {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  background: var(--bg-white);
  border: 1px solid var(--acc-border);
  border-radius: 16px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.04));
}

.account-panel__title {
  font-weight: var(--fw-bold);
  font-size: 32px;
  line-height: 38px;
  color: var(--text-dark-900);
}

.account-panel__title--md {
  font-size: 28px;
  line-height: normal;
  color: var(--acc-title);
}

.account-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.account-panel__count {
  font-weight: var(--fw-bold);
  font-size: 14px;
  color: var(--text-gray-400);
}

.account-panel__lead {
  font-size: 14px;
  color: var(--text-gray-600);
}

.account-panel__intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Плашка-уведомление (Figma 1:22380, 1:17982) ──────────── */

.account-alert {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--acc-yellow-bg);
  border: 1px solid var(--acc-yellow);
  border-radius: 8px;
}

.account-alert--center {
  align-items: center;
}

.account-alert__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.account-alert__text {
  flex: 1 1 0;
  min-width: 0;
  font-size: 14px;
  line-height: 22px;
  color: var(--text-dark-900);
}

.account-alert__link {
  font-weight: var(--fw-bold);
  color: var(--acc-link);
  text-decoration: underline;
  white-space: nowrap;
}

/* ── Дашборд (account.html) ───────────────────────────────── */

.account-welcome {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.account-welcome__hello {
  font-size: 16px;
  color: var(--text-dark-900);
}

.account-welcome__hello b {
  font-weight: var(--fw-bold);
}

.account-welcome__logout {
  font-weight: var(--fw-regular);
  color: var(--acc-link);
  text-decoration: underline;
}

.account-welcome__desc {
  font-size: 14px;
  line-height: 24px;
  color: var(--text-gray-600);
}

.account-actions {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.account-action-card {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border: 1px solid var(--acc-border);
  border-radius: 12px;
}

.account-action-card:hover {
  border-color: var(--acc-yellow);
}

.account-action-card__title {
  font-weight: var(--fw-bold);
  font-size: 16px;
  color: var(--text-dark-900);
}

.account-action-card__desc {
  font-size: 13px;
  line-height: 18px;
  color: var(--text-gray-600);
}

/* ── Бейджи статусов заказов ──────────────────────────────── */

.account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: var(--fw-bold);
  font-size: 12px;
  white-space: nowrap;
}

.account-badge--processing {
  background: var(--acc-yellow-bg);
  border-color: var(--acc-yellow);
  color: var(--text-brown-dark);
}

.account-badge--shipping {
  background: var(--acc-teal-bg);
  border-color: var(--acc-teal);
  color: var(--acc-teal);
}

.account-badge--done {
  background: var(--acc-gray-bg);
  border-color: var(--text-gray-400);
  color: var(--text-gray-600);
}

/* ── Кнопки-таблетки ЛК ───────────────────────────────────── */

/* Жёлтая (как .auth-card__submit, но авто-ширина) */
.account-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 10px 25px;
  border-radius: 90px;
  background: var(--yellow-500);
  font-weight: var(--fw-bold);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-brown-dark);
}

.account-pill:hover {
  background: var(--yellow-450);
}

/* Контурная «Подробнее» (Figma 1:21271) */
.account-pill--outline {
  height: auto;
  padding: 10px 20px;
  border: 1.5px solid var(--acc-yellow);
  border-radius: 20px;
  background: transparent;
  font-size: 13px;
  text-transform: none;
  color: var(--text-dark-900);
}

.account-pill--outline:hover {
  background: var(--acc-yellow-bg);
}

/* ── Формы ЛК (анкета, адреса) — база из .auth-field ──────── */

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

.account-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.account-form__hint {
  margin-top: -8px;
  font-size: 11px;
  line-height: 15px;
  color: var(--text-gray-600);
}

.account-form__subtitle {
  margin-top: 16px;
  font-weight: var(--fw-bold);
  font-size: 18px;
  color: var(--text-dark-900);
}

.account-form__submit {
  margin-top: 8px;
  align-self: flex-start;
}

/* select в стиле .auth-field__input */
.account-form select.auth-field__input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2354595F' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ── Пустое состояние ЛК на мобильном (Figma 1:17989 заказы, 1:17149 загрузки):
      карточка с иконкой, заголовком и жёлтой кнопкой «Перейти в каталог» ── */

.account-empty-card {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  background: var(--bg-white);
  border: 1px solid var(--acc-border);
  border-radius: 12px;
}

.account-empty-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
}

.account-empty-card__icon img {
  width: 44px;
  height: 44px;
  filter: brightness(0);
}

.account-empty-card__title {
  font-weight: var(--fw-bold);
  font-size: 14px;
  text-align: center;
  color: var(--text-dark-900);
}

.account-empty-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px;
  border-radius: 24px;
  background: #ffd600;
  font-weight: var(--fw-bold);
  font-size: 14px;
  text-transform: uppercase;
  color: var(--text-brown-dark);
}

.account-empty-card__btn:hover {
  background: var(--yellow-450);
}

@media (max-width: 767px) {
  .account-empty-card {
    display: flex;
  }

  /* Desktop-callout прячется, вместо него карточка */
  .account-empty-desktop {
    display: none;
  }
}

/* ── Мобильный экран профиля (account.html, Figma 1:22398) ── */

.account-mobile {
  display: none;
}

/* ── Адаптив ──────────────────────────────────────────────── */

@media (max-width: 1023px) {
  .account {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .account-nav {
    flex: none;
  }

  .account-nav__sidebar {
    display: none;
  }

  .account-nav__tabs {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--acc-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .account-nav__tabs::-webkit-scrollbar {
    display: none;
  }

  .account-nav__tab {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--acc-gray-bg);
    font-weight: var(--fw-medium);
    font-size: 12px;
    white-space: nowrap;
    color: var(--text-dark-900);
  }

  .account-nav__tab.is-active {
    background: var(--acc-yellow);
    font-weight: var(--fw-bold);
  }

  .account-panel {
    padding: 24px 20px;
    gap: 20px;
  }

  .account-panel__title {
    font-size: 24px;
    line-height: 1.2;
  }

  .account-panel__title--md {
    font-size: 22px;
  }

  .account-actions {
    flex-direction: column;
  }
}

@media (max-width: 767px) {
  .account {
    padding-bottom: 48px;
  }

  .account-panel {
    padding: 16px;
    gap: 16px;
  }

  .account-panel__title {
    font-size: 20px;
  }

  .account-panel__title--md {
    font-size: 20px;
  }

  .account-form__row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Дашборд на мобильном превращается в экран профиля */
  .page--account-home .breadcrumbs,
  .page--account-home .account {
    display: none;
  }

  .page--account-home .account-mobile {
    display: block;
  }

  /* Профиль-экран тянется от края до края */
  .account-mobile {
    margin: 0 calc(-1 * var(--container-padding));
    padding-bottom: 32px;
  }

  .account-mobile__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 140px;
    padding: 20px 64px 20px 20px;
    background: var(--text-dark-900);
  }

  .account-mobile__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border: 2px solid var(--yellow-500);
    border-radius: 50%;
    font-weight: var(--fw-bold);
    font-size: 22px;
    color: var(--bg-white);
  }

  .account-mobile__user {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
  }

  .account-mobile__name {
    font-weight: var(--fw-bold);
    font-size: 17px;
    color: var(--bg-white);
  }

  .account-mobile__email {
    font-size: 13px;
    color: var(--text-gray-300);
  }

  .account-mobile__status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--success);
  }

  .account-mobile__status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
  }

  .account-mobile__edit {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #2e2e2e;
  }

  .account-mobile__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--acc-divider);
    background: var(--bg-white);
  }

  .account-mobile__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 88px;
  }

  .account-mobile__stat + .account-mobile__stat {
    border-left: 1px solid var(--acc-divider);
  }

  .account-mobile__stat-value {
    font-weight: var(--fw-bold);
    font-size: 22px;
    color: var(--text-dark-800);
  }

  .account-mobile__stat-label {
    font-size: 12px;
    color: var(--acc-muted);
  }

  .account-mobile__section {
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 8px 20px;
    background: var(--acc-row-bg);
    font-weight: var(--fw-medium);
    font-size: 12px;
    color: var(--acc-muted);
  }

  .account-mobile__menu {
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
  }

  .account-mobile__link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 12px 20px;
  }

  .account-mobile__link::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    width: 3px;
    height: 36px;
    border-radius: 2px;
    background: var(--yellow-500);
  }

  .account-mobile__link:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 0;
    height: 1px;
    background: var(--acc-divider);
  }

  .account-mobile__link-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 0;
  }

  .account-mobile__link-title {
    font-weight: var(--fw-medium);
    font-size: 15px;
    color: var(--text-dark-800);
  }

  .account-mobile__link-desc {
    font-size: 12px;
    color: var(--acc-muted);
  }

  .account-mobile__counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 20px;
    padding: 0 8px;
    border-radius: 10px;
    background: var(--acc-row-bg);
    font-size: 11px;
    color: var(--acc-muted);
  }

  .account-mobile__chevron {
    font-weight: var(--fw-bold);
    font-size: 20px;
    line-height: 1;
    color: var(--text-gray-200);
  }

  .account-mobile__help {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 72px;
    padding: 14px 20px;
    background: var(--acc-row-bg);
  }

  .account-mobile__help-title {
    font-weight: var(--fw-bold);
    font-size: 14px;
    color: var(--text-dark-800);
  }

  .account-mobile__help-text {
    font-size: 12px;
    color: var(--acc-muted);
  }

  .account-mobile__logout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 56px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--acc-divider);
    background: var(--bg-white);
    font-size: 14px;
    color: var(--red-dark);
  }

  .account-mobile__logout .account-mobile__chevron {
    color: var(--red-dark);
  }
}
