/* ── Settings pages (profile + account) ─────────────── */

.settings-page {
  height: 100%;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.settings-page__inner {
  max-width: 720px;
  margin: 0 auto;
}

.settings-page__header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.settings-page__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

/* ── Section cards ───────────────────────────────────── */

.settings-section {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.settings-section__title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.3);
  margin: 0 0 1.25rem 0;
}

/* ── Profile two-column grid ─────────────────────────── */

.settings-profile-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 2rem;
  align-items: start;
}

.settings-avatar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.settings-avatar-col .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.settings-avatar-upload {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  transition: color 0.15s;

  &:hover {
    color: rgba(255, 255, 255, 0.7);
  }
}

.settings-avatar-delete {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;

  &:hover {
    color: var(--color-negative);
    background: rgba(255, 255, 255, 0.04);
  }
}

/* ── Form fields ─────────────────────────────────────── */

.settings-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.settings-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.settings-field__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
}

.settings-field .input,
.settings-field input,
.settings-field textarea {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9) !important;
  padding: 0.55rem 0.85rem;
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s, background 0.15s;
  box-sizing: border-box;

  &::placeholder {
    color: rgba(255, 255, 255, 0.2);
  }

  &:focus {
    outline: none;
    border-color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.08) !important;
  }
}

.settings-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.settings-submit-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;

  &:hover {
    opacity: 0.88;
  }
}

/* ── Memberships grid ────────────────────────────────── */

.settings-memberships {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.settings-membership-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 0.3rem 0.85rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;

  &:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
  }
}

/* ── Account settings two-column ─────────────────────── */

.settings-account-header {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.settings-account-logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  position: relative;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

.settings-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

/* ── Users list ──────────────────────────────────────── */

.settings-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ── Transfer section ────────────────────────────────── */

.settings-transfer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.settings-transfer__url {
  flex: 1;
  min-width: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
}

/* ── Tool nav cards ──────────────────────────────────── */

.settings-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.settings-tool-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;

  &:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
  }
}

.settings-tool-card__icon {
  opacity: 0.55;
  flex-shrink: 0;
  filter: invert(1);
}

.settings-tool-card__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.15rem;
}

.settings-tool-card__desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

/* ── Toggle row ──────────────────────────────────────── */

.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;

  & + .settings-toggle-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
}

.settings-toggle-row__label {
  flex: 1;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}
