/* ==========================================================================
   Profile page — cabinet shell + settings cards
   ========================================================================== */

.profile-head {
  display: grid;
  gap: 6px;
  animation: dealRise 0.6s var(--ease-out) both;
}
.profile-head__title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.profile-head__sub {
  font-size: 15px;
  color: var(--muted);
}

.profile-stack {
  margin-top: clamp(16px, 3vw, 28px);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr); /* не даёт auto-колонке раздуваться за контейнер */
}

.profile-card { min-width: 0;
  background: var(--white);
  border-radius: var(--r-xl);
  padding: clamp(20px, 3.5vw, 40px);
  animation: dealRise 0.6s var(--ease-out) both;
}
.profile-card:nth-child(2) { animation-delay: 0.08s; }
.profile-card:nth-child(3) { animation-delay: 0.16s; }
.profile-card:nth-child(4) { animation-delay: 0.24s; }

.profile-card--uid { background: var(--surface); }

.profile-card__head { display: grid; gap: 5px; }
.profile-card__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.profile-card__desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 620px;
}

/* User ID row */
.uid-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.uid-row__value {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  padding: 13px 18px;
  border-radius: var(--r-md);
  background: var(--white);
  border: 1.5px solid var(--line);
  word-break: break-all;
  user-select: all;
}
.uid-row__copy {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.3s var(--ease-out), background-color 0.3s var(--ease-out);
}
.uid-row__copy:hover { background: #1d1d20; transform: translateY(-2px); }
.uid-row__copy svg { width: 17px; height: 17px; }
.uid-row__copy.is-copied { background: var(--olive); color: var(--white); }

/* forms inside cards */
.profile-form { margin-top: 22px; display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }

.profile-cols {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  align-items: start; /* columns must not stretch to the tallest sibling */
}
@media (min-width: 800px) {
  .profile-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .profile-cols--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  /* stacked-margin must not shift grid columns */
  .profile-cols .dfield + .dfield { margin-top: 0; }
}

.profile-form__footer {
  display: flex;
  align-items: center;
  gap: 14px;
}
.profile-save { position: relative; }
.profile-save.is-done {
  background: var(--olive) !important;
  color: var(--white) !important;
  pointer-events: none;
}
.btn--dark.profile-save.is-done { background: var(--olive) !important; }

/* password fields reuse auth styles but with dark toggle */
.profile-form .pass-toggle {
  right: 9px;
}

@media (prefers-reduced-motion: reduce) {
  .profile-head, .profile-card { min-width: 0; animation: none; }
}

/* компактный чеклист требований пароля */
.requirements {
  margin: 0;
}
.requirements .req {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.requirements .req::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex: none;
  transition: all 0.2s var(--ease-out);
}
.requirements .req.is-done {
  color: var(--ink);
  font-weight: 500;
}
.requirements .req.is-done::before {
  background: var(--lime);
  border-color: var(--olive-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px;
}

/* выравнивание полей пароля — ошибки не занимают место */

#passForm .dfield {
  position: relative;
}


/* в grid-сетках пароля — БЕЗ margin между полями */
#passForm [style*="1fr 1fr"] .dfield,
#passForm .dfield + .dfield {
  margin-top: 0 !important;
}

/* чеклист — вертикальный список */
#passForm .requirements {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: 480px;
}

/* в профиле input-wrap без лишнего отступа (label уже даёт gap) */
.profile-form .input-wrap { margin-top: 0; }

/* пароль — всегда один столбик на любом экране */
#passForm .profile-cols {
  grid-template-columns: minmax(0, 1fr) !important;
  max-width: 480px;
}

/* когда сайдбар уходит наверх (≤999px) — поля на всю ширину */
@media (max-width: 999px) {
  #passForm .profile-cols,
  #passForm .requirements {
    max-width: 100%;
  }
}

/* компактный чеклист требований пароля */
.requirements {
  margin: 0;
}
.requirements .req {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.requirements .req::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex: none;
  transition: all 0.2s var(--ease-out);
}
.requirements .req.is-done {
  color: var(--ink);
  font-weight: 500;
}
.requirements .req.is-done::before {
  background: var(--lime);
  border-color: var(--olive-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px;
}

/* выравнивание полей пароля — ошибки не занимают место */

#passForm .dfield {
  position: relative;
}


/* чеклист — вертикальный список */
#passForm .requirements {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: 480px;
}

/* компактный чеклист требований пароля */
.requirements {
  margin: 0;
}
.requirements .req {
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.requirements .req::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  flex: none;
  transition: all 0.2s var(--ease-out);
}
.requirements .req.is-done {
  color: var(--ink);
  font-weight: 500;
}
.requirements .req.is-done::before {
  background: var(--lime);
  border-color: var(--olive-deep);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 5.2 4 7l4-4.4' fill='none' stroke='%230c0c0d' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 8px;
}

/* выравнивание полей пароля — ошибки не занимают место */

#passForm .dfield {
  position: relative;
}


/* чеклист — вертикальный список */
#passForm .requirements {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  max-width: 480px;
}
