/* =========================================================
   AniLog — аккаунт: модалка настроек, вкладки и анкета
   ========================================================= */

.import-badge {
  /* Слева сверху живёт пилюля статуса (top 12 + высота 30): бейдж — строго
     под ней, иначе пилюля его перекрывает и нажать невозможно. */
  position: absolute;
  top: 50px;
  left: 12px;
  z-index: 12;
  padding: 4px 8px;
  border: 1px solid rgba(167, 139, 250, 0.55);
  border-radius: 8px;
  background: rgba(14, 15, 25, 0.82);
  color: #c4b5fd;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.import-badge:hover,
.import-badge:focus-visible {
  background: rgba(139, 92, 246, 0.32);
  border-color: rgba(196, 181, 253, 0.8);
  color: #fff;
}

/* Импорт: выбор файла и превью */

.file-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.file-shell:hover {
  border-color: rgba(167, 139, 250, 0.55);
  background: rgba(139, 92, 246, 0.06);
}

.file-shell .icon {
  width: 15px;
  height: 15px;
  color: var(--violet-light);
}

.file-shell__text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-shell input[type="file"] {
  display: none;
}

.import-preview__count {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}

.import-preview__list {
  margin: 8px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  list-style: none;
  max-height: 128px;
  overflow-y: auto;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.7;
}

.import-preview__meta {
  margin-left: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.import-preview__more {
  color: var(--muted);
}

/* Разделитель «или» на экране восстановления */

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
}

/* Анкета восстановления «по памяти» */

.quiz-questions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 46vh;
  padding-right: 4px;
  margin-bottom: 14px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.quiz-question {
  margin: 0;
  padding: 10px 11px 11px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.quiz-question__text {
  margin-bottom: 8px;
  padding: 0 2px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.45;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.35;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.quiz-option:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.quiz-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--violet);
  flex-shrink: 0;
}

/* Модалка аккаунта */

.account-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.account-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}

.account-info__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.account-info__row:last-child {
  border-bottom: 0;
}

.account-info dt {
  color: var(--muted);
  font-size: 11.5px;
}

.account-info dd {
  margin: 0;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.retention-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 4px 2px;
  cursor: pointer;
}

/* Разделительная линия только между настройками, без лишних отступов:
   расстояние задаёт .account-view (gap: 14px). */
.retention-toggle + .retention-toggle {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

#account-view-info .form-actions {
  justify-content: flex-start;
  margin-top: 0;
}

#acc-delete-button {
  padding: 8px 14px;
  font-size: 12px;
}

.retention-toggle input {
  margin: 2px 0 0;
  accent-color: var(--accent, currentColor);
}

.retention-toggle__label {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.retention-toggle__hint {
  display: block;
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.5;
}

/* Вкладки настроек аккаунта */

.account-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.account-tabs__tab {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.account-tabs__tab .icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.account-tabs__tab:hover {
  color: var(--text);
}

.account-tabs__tab[aria-selected="true"] {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(139, 92, 246, 0.14);
  color: var(--violet-light);
}

.account-tabs__tab:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 1px;
}

.account-tab-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

/* Карточки действий внутри категорий */

.account-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-action {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.account-action:hover,
.account-action:focus-visible {
  border-color: rgba(167, 139, 250, 0.45);
  background: rgba(139, 92, 246, 0.07);
}

.account-action > .icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  color: var(--violet-light);
}

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

.account-action__label {
  font-size: 12px;
  font-weight: 700;
}

.account-action__hint {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1.45;
}

.account-action__go {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  color: var(--muted);
  transform: rotate(-90deg);
}

.account-actions--danger .account-action--danger {
  border-color: rgba(248, 113, 113, 0.3);
}

.account-actions--danger .account-action--danger > .icon,
.account-actions--danger .account-action--danger:hover {
  color: #f87171;
}

.account-actions--danger .account-action--danger:hover,
.account-actions--danger .account-action--danger:focus-visible {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(248, 113, 113, 0.07);
}

/* Кнопка «Назад к настройкам» в верхней части форм */
.form-actions--top {
  justify-content: flex-start;
  margin-top: 0;
}
