.settings-main {
  min-height: 100vh;
  margin-left: var(--sidebar);
  background: #fff;
  transition: margin-left 560ms cubic-bezier(.22,1,.36,1);
}

body.sidebar-collapsed .settings-main { margin-left: 0; }

@media (min-width: 721px) {
  body.top-navigation .settings-main { margin-left: 0; }
}

.settings-topbar {
  display: flex;
  align-items: center;
  min-height: 84px;
  padding: 0 clamp(28px, 3.5vw, 54px);
  border-bottom: 1px solid var(--line);
}

.settings-topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -1px;
}

.settings-content {
  width: min(760px, calc(100% - 56px));
  padding: 38px 0 88px;
  margin-left: clamp(28px, 3.5vw, 54px);
}

.settings-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 20px 28px;
  border-bottom: 1px solid var(--line);
}

.setting-copy h2,
.brand-pages > h2 {
  margin: 0;
  color: #151513;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.45px;
}

.setting-copy h2 { display: flex; align-items: center; gap: 9px; }
.setting-copy h2 .material-symbols-rounded { font-size: 21px; }
.setting-copy p { margin: 8px 0 0; color: #92928d; font-size: 14px; line-height: 1.35; }

.primary-action {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 0 15px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: transform 180ms ease, background-color 180ms ease;
}

.primary-action:hover { background: #2b2b29; transform: translateY(-1px); }
.primary-action:focus-visible { outline: 2px solid #111; outline-offset: 3px; }

.brand-pages { padding: 28px 20px 0; }
.brand-row { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; min-height: 92px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.brand-row strong { font-size: 15px; }
.brand-arrow { transition: transform 180ms ease; }
.brand-row:hover .brand-arrow { transform: translateX(3px); }
.brand-mark { position: relative; width: 30px; height: 30px; transform: rotate(45deg); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 8px 0; border-radius: 999px; background: linear-gradient(135deg, #ffb4ee, #dd62ec); }
.brand-mark::after { transform: rotate(90deg); }

.edit-profile { padding-top: 24px; }
.profile-setting-copy { display: flex; align-items: center; gap: 12px; }
.profile-setting-copy img { width: 40px; height: 40px; border-radius: 7px; object-fit: cover; }
.profile-setting-copy > .material-symbols-rounded { width: 40px; height: 40px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid #e5e5e1; border-radius: 7px; color: #4c4c48; background: #f5f5f2; font-size: 20px; }
.profile-setting-copy p { margin-top: 4px; }

.notification-settings { padding: 28px 20px 0; }
.notification-heading { margin-bottom: 22px; }
.toggle-list { display: grid; gap: 17px; }
.toggle-row { position: relative; display: grid; grid-template-columns: 30px 1fr; align-items: start; gap: 10px; width: fit-content; cursor: pointer; }
.toggle-row input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-control { position: relative; width: 29px; height: 17px; margin-top: 1px; border-radius: 999px; background: #d5d5d1; transition: background-color 180ms ease; }
.toggle-control::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: transform 220ms cubic-bezier(.16,1,.3,1); }
.toggle-row input:checked + .toggle-control { background: #111; }
.toggle-row input:checked + .toggle-control::after { transform: translateX(12px); }
.toggle-row input:focus-visible + .toggle-control { outline: 2px solid #111; outline-offset: 3px; }
.toggle-row strong, .toggle-row small { display: block; }
.toggle-row strong { color: #1b1b19; font-size: 14px; font-weight: 600; line-height: 1.2; }
.toggle-row small { margin-top: 4px; color: #989893; font-size: 13px; line-height: 1.3; }

.logout-button { display: inline-flex; align-items: center; gap: 8px; margin: 44px 20px 0; padding: 8px 0; border: 0; background: transparent; color: #e2241a; font-size: 15px; cursor: pointer; }
.logout-button span { font-size: 19px; }

@media (max-width: 720px) {
  .settings-main { margin: 0; }
  .settings-topbar { min-height: 68px; padding: 0 18px; }
  .settings-content { width: auto; margin: 0; padding: 24px 14px 80px; }
  .settings-section { align-items: flex-start; padding-right: 4px; padding-left: 4px; }
  .brand-pages, .notification-settings { padding-right: 4px; padding-left: 4px; }
  .primary-action { min-height: 36px; padding: 0 11px; }
  .setting-copy p { max-width: 34ch; }
}

@media (max-width: 460px) {
  .settings-section { display: grid; }
  .settings-section .primary-action { width: fit-content; }
}
