.xaf-settings {
  width: min(100%, 1000px);
  margin: 24px auto 60px;
  color: #f4f1fa;
}
.xaf-settings-header {
  margin-bottom: 22px;
}
.xaf-settings-eyebrow {
  color: #a77be8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}
.xaf-settings-header h1 {
  margin: 7px 0;
  font-size: clamp(25px, 4vw, 34px);
  letter-spacing: -.8px;
}
.xaf-settings-header p,
.xaf-settings-description {
  color: #9995a7;
  font-size: 13px;
  line-height: 1.6;
}
.xaf-settings-layout {
  display: grid;
  grid-template-columns: 205px minmax(0, 1fr);
  gap: 17px;
  align-items: start;
}
.xaf-settings-nav,
.xaf-settings-content {
  background: #171820;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 15px;
}
.xaf-settings-nav {
  display: grid;
  gap: 5px;
  padding: 9px;
  position: sticky;
  top: 85px;
}
.xaf-settings-nav button {
  border: 0;
  background: transparent;
  color: #aaa6b5;
  text-align: left;
  border-radius: 9px;
  padding: 12px;
  font-size: 13px;
  cursor: pointer;
  transition: .18s ease;
}
.xaf-settings-nav button:hover {
  background: rgba(255,255,255,.045);
  color: white;
}
.xaf-settings-nav button.active {
  color: #dfc9ff;
  background: rgba(151,91,224,.15);
  box-shadow: inset 2px 0 #a66aef;
}
.xaf-settings-content {
  min-width: 0;
  padding: 25px;
}
.xaf-settings-section {
  display: none;
}
.xaf-settings-section.active {
  display: block;
  animation: xafSettingsAppear .2s ease;
}
@keyframes xafSettingsAppear {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.xaf-settings-section h2 {
  margin: 0 0 7px;
  font-size: 20px;
}
.xaf-settings-section h3 {
  font-size: 15px;
  margin: 17px 0 5px;
}
.xaf-settings-section form {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}
.xaf-settings-label {
  display: grid;
  gap: 8px;
  color: #c9c4d2;
  font-size: 12px;
}
.xaf-settings-label input {
  width: 100%;
  height: 43px;
  box-sizing: border-box;
  border-radius: 9px;
  border: 1px solid #343340;
  background: #101117;
  color: white;
  padding: 0 12px;
  outline: none;
}
.xaf-settings-label input:focus {
  border-color: #9862d8;
  box-shadow: 0 0 0 3px rgba(152,98,216,.12);
}
.xaf-avatar-editor {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
}
.xaf-avatar-preview {
  width: 65px;
  height: 65px;
  flex: 0 0 65px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: #292039;
  color: #d9c2ff;
  font-size: 25px;
  font-weight: 700;
}
.xaf-avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.xaf-avatar-editor strong {
  font-size: 13px;
}
.xaf-avatar-editor p {
  margin: 5px 0 9px;
  color: #9691a1;
  font-size: 11px;
}
.xaf-file-button {
  display: inline-flex;
  padding: 7px 10px;
  border: 1px solid #514064;
  border-radius: 7px;
  color: #d6baff;
  font-size: 11px;
  cursor: pointer;
}
.xaf-settings-primary,
.xaf-settings-secondary {
  min-height: 41px;
  border-radius: 9px;
  padding: 0 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.xaf-settings-primary {
  justify-self: start;
  border: 1px solid #9c68df;
  background: linear-gradient(110deg,#7542b7,#985bd8);
  color: white;
}
.xaf-settings-primary:hover {
  filter: brightness(1.12);
}
.xaf-settings-primary:disabled {
  opacity: .55;
  cursor: wait;
}
.xaf-settings-secondary {
  border: 1px solid #493b5b;
  background: rgba(150,91,220,.08);
  color: #d8c3f5;
}
.xaf-choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border: 1px solid #33313d;
  border-radius: 11px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
}
.xaf-choice:has(input:checked) {
  border-color: #8053b4;
  background: rgba(143,89,201,.09);
}
.xaf-choice input {
  margin-top: 3px;
  accent-color: #a36be6;
}
.xaf-choice span,
.xaf-toggle-row span {
  display: grid;
  gap: 5px;
}
.xaf-choice strong,
.xaf-toggle-row strong {
  font-size: 12px;
}
.xaf-choice small,
.xaf-toggle-row small {
  color: #9691a1;
  font-size: 11px;
  line-height: 1.5;
}
.xaf-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  cursor: pointer;
}
.xaf-toggle-row input {
  width: 17px;
  height: 17px;
  accent-color: #9d67df;
}
.xaf-settings-notice {
  margin-top: 20px;
  padding: 17px;
  border: 1px solid rgba(164,124,216,.22);
  border-radius: 11px;
  background: rgba(146,91,203,.07);
}
.xaf-settings-notice strong {
  font-size: 13px;
  color: #d8baff;
}
.xaf-settings-notice p,
.xaf-settings-footnote {
  color: #a6a1b0;
  font-size: 12px;
  line-height: 1.65;
}
.xaf-settings-divider {
  height: 1px;
  margin: 23px 0;
  background: rgba(255,255,255,.08);
}
@media (max-width: 700px) {
  .xaf-settings {
    margin: 15px auto 35px;
  }
  .xaf-settings-header {
    padding: 0 3px;
  }
  .xaf-settings-layout {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .xaf-settings-nav {
    position: static;
    display: flex;
    overflow-x: auto;
    gap: 5px;
    padding: 7px;
    scrollbar-width: none;
  }
  .xaf-settings-nav::-webkit-scrollbar {
    display: none;
  }
  .xaf-settings-nav button {
    flex: 0 0 auto;
    padding: 10px 12px;
    white-space: nowrap;
    font-size: 11px;
  }
  .xaf-settings-nav button.active {
    box-shadow: inset 0 -2px #a66aef;
  }
  .xaf-settings-content {
    padding: 18px 14px;
    border-radius: 13px;
  }
  .xaf-settings-section h2 {
    font-size: 18px;
  }
  .xaf-settings-primary {
    width: 100%;
  }
}
/* XAFENTOL PREMIUM TOP NAVIGATION */
.xaf-settings-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.xaf-settings-nav {
  position: relative;
  top: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  background: #171820;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 13px;
}

.xaf-settings-nav::-webkit-scrollbar {
  display: none;
}

.xaf-settings-nav button {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  min-height: 42px;
  padding: 0 17px;
  text-align: center;
  white-space: nowrap;
  border-radius: 9px;
  transition: color .25s ease, background .25s ease;
}

.xaf-settings-nav button.active {
  color: #f0e4ff;
  background: linear-gradient(120deg,rgba(132,76,190,.3),rgba(160,99,222,.17));
  box-shadow: inset 0 0 0 1px rgba(177,125,235,.2), 0 3px 14px rgba(100,52,150,.12);
}

.xaf-settings-content {
  width: 100%;
  box-sizing: border-box;
}

@media(max-width:700px) {
  .xaf-settings-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .xaf-settings-nav {
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    position: relative;
    top: auto;
    padding: 5px;
    border-radius: 11px;
  }

  .xaf-settings-nav button {
    flex: 0 0 auto;
    min-height: 39px;
    padding: 0 13px;
    font-size: 11px;
  }

  .xaf-settings-content {
    min-width: 0;
    width: 100%;
  }
}
/* XAFENTOL — SLIDING TAB INDICATOR */
.xaf-settings-nav {
  position: relative;
  isolation: isolate;
}

.xaf-settings-indicator {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 9px;
  background: linear-gradient(
    120deg,
    rgba(132, 76, 190, .38),
    rgba(160, 99, 222, .24)
  );
  box-shadow:
    inset 0 0 0 1px rgba(177, 125, 235, .25),
    0 3px 16px rgba(100, 52, 150, .2);
  transition:
    transform .32s cubic-bezier(.22, 1, .36, 1),
    width .32s cubic-bezier(.22, 1, .36, 1),
    height .32s cubic-bezier(.22, 1, .36, 1);
  will-change: transform, width;
}

.xaf-settings-nav button.active {
  background: transparent !important;
  box-shadow: none !important;
  color: #f4eaff;
}

.xaf-settings-nav button {
  z-index: 1;
}
