:root {
  --menu-ink: #091d45;
  --menu-blue: #1a72d3;
  --menu-line: #d8e5f3;
}

.header-actions { margin-left: auto; }

.forex-menu-button {
  width: 38px;
  height: 36px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 0 10px;
  border-radius: 10px;
  background: #eef5fd;
  color: var(--menu-ink);
}

.forex-menu-button:hover,
.forex-menu-button.is-open { background: #deedfc; }

.forex-menu-button span {
  height: 2px;
  width: 18px;
  display: block;
  border-radius: 2px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.forex-menu-button.is-open span:first-child { transform: translateY(7px) rotate(45deg); }
.forex-menu-button.is-open span:nth-child(2) { opacity: 0; }
.forex-menu-button.is-open span:last-child { transform: translateY(-7px) rotate(-45deg); }

.forex-menu-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  background: rgb(4 20 52 / 45%);
  backdrop-filter: blur(2px);
}

.forex-menu {
  position: fixed;
  z-index: 81;
  inset: 0 auto 0 0;
  width: min(330px, 88vw);
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: linear-gradient(150deg, #fbfdff, #eaf4ff);
  box-shadow: 20px 0 48px rgb(5 31 79 / 24%);
  transform: translateX(-105%);
  transition: transform .25s ease;
}

.forex-menu.is-open { transform: translateX(0); }

.forex-menu__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 22px;
  border-bottom: 1px solid var(--menu-line);
}

.forex-menu__eyebrow {
  margin: 22px 12px 8px;
  color: #6a829e;
  font: 700 10px "DM Mono", monospace;
  letter-spacing: 1.2px;
}

.forex-menu ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forex-menu li button {
  width: 100%;
  padding: 12px;
  border-radius: 9px;
  color: #385778;
  background: transparent;
  text-align: left;
  font-size: 13px;
  font-weight: 800;
}

.forex-menu li button:hover,
.forex-menu li button.active {
  color: var(--menu-blue);
  background: #dfeefc;
}

.forex-menu .locked:after { content: ""; }
.forex-menu .locked:not(.entitled)::after {
  content: "Access";
  float: right;
  padding: 2px 5px;
  border-radius: 4px;
  color: #7790ad;
  background: #e9f0f7;
  font: 700 8px "DM Mono", monospace;
}

.forex-menu__landing {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding: 13px 12px;
  border-top: 1px solid var(--menu-line);
  color: #1767bf;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.forex-menu__landing span { font-size: 17px; line-height: 12px; }
.forex-menu-open { overflow: hidden; }

.forex-footer {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 68px) 30px;
}

.forex-footer__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--menu-line);
}

.forex-footer__meta p {
  flex: 1;
  margin: 0;
  color: #73849c;
  font-size: 11px;
}

.forex-footer__meta > a:last-child {
  color: #226cc4;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}

.mobile-nav { display: none; }

.profile-settings {
  padding: clamp(20px, 3vw, 32px);
  overflow: hidden;
}

.profile-settings__intro {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 17px;
  padding-bottom: 22px;
  border-bottom: 1px solid #dbe7f3;
}

.profile-settings__intro h2,
.profile-settings h3 {
  margin: 0;
  color: var(--menu-ink);
  letter-spacing: -.7px;
}

.profile-settings__intro h2 { font-size: 25px; }
.profile-settings__intro p:not(.eyebrow) {
  max-width: 680px;
  margin: 7px 0 0;
  color: #6d8099;
  font-size: 12px;
  line-height: 1.65;
}

.profile-avatar-editor,
.profile-avatar-image,
.profile-avatar-fallback {
  width: 68px;
  height: 68px;
  border-radius: 20px;
}

.profile-avatar-editor {
  display: grid;
  overflow: hidden;
  place-items: center;
  background: linear-gradient(135deg, #277bdd, #0b2d71);
  box-shadow: 0 10px 24px #176ccc35;
}

.profile-avatar-image { display: block; object-fit: cover; }
.profile-avatar-fallback {
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 25px;
  font-weight: 800;
}

.profile-settings-form { display: grid; gap: 26px; margin-top: 26px; }
.profile-settings-form section { display: grid; gap: 14px; }
.profile-settings-form h3 { font-size: 16px; }

.profile-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.profile-settings-form label,
.profile-email-field,
.profile-network-help {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #dbe7f4;
  border-radius: 10px;
  color: #61768f;
  background: #fbfdff;
  font-size: 10px;
  font-weight: 800;
}

.profile-settings-form label small,
.profile-email-field small {
  color: #8897aa;
  font-size: 9px;
  font-weight: 600;
}

.profile-settings-form input:not([type="checkbox"]),
.profile-settings-form select {
  width: 100%;
  min-width: 0;
  padding: 8px 0 0;
  border: 0;
  outline: 0;
  color: #183c70;
  background: transparent;
  font: 700 12px "DM Mono", monospace;
}

.profile-settings-form input[type="file"] {
  padding-top: 5px;
  color: #386697;
  font: 600 10px Manrope, Arial, sans-serif;
}

.profile-email-field > span,
.profile-network-help strong {
  color: #61768f;
  font-size: 10px;
}

.profile-email-field strong { color: #173d70; font-size: 12px; }
.profile-network-help { justify-content: center; }
.profile-network-help span { color: #8090a4; font-weight: 600; line-height: 1.5; }

.profile-section-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.profile-section-title p,
.auto-payout-panel p {
  margin: 5px 0 0;
  color: #74869d;
  font-size: 11px;
  line-height: 1.55;
}

.network-badge {
  padding: 6px 8px;
  border-radius: 6px;
  color: #087957;
  background: #e1f8ee;
  font: 800 9px "DM Mono", monospace;
}

.auto-payout-panel {
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr);
  align-items: center;
  padding: 18px;
  border: 1px solid #cce3fb;
  border-radius: 12px;
  background: linear-gradient(120deg, #eef7ff, #fbfdff);
}

.auto-payout-controls { display: grid; gap: 10px; }
.auto-payout-toggle {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #24486f !important;
  font-size: 11px !important;
}

.auto-payout-toggle input { accent-color: #176dcd; }
.profile-settings-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding-top: 4px;
}

.profile-settings-actions p {
  margin: 0;
  color: #72859c;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .profile-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  main { padding-bottom: 92px; }
  .topbar { gap: 10px; }
  .header-actions .icon-button { display: none; }
  .forex-menu-button { width: 36px; height: 34px; }
  .forex-footer { padding: 0; }
  .forex-footer__meta { display: none; }
  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid #dce7f4;
    background: rgb(250 253 255 / 95%);
    backdrop-filter: blur(16px);
  }
  .mobile-nav a,
  .mobile-nav button {
    display: grid;
    min-width: 46px;
    gap: 3px;
    place-items: center;
    padding: 0;
    color: #7a8da5;
    background: transparent;
    text-decoration: none;
  }
  .mobile-nav svg { width: 18px; height: 18px; fill: currentColor; }
  .mobile-nav span { font-size: 8px; font-weight: 800; }
  .mobile-nav button.active { color: #176dcd; }
  .profile-settings { padding: 18px; }
  .profile-settings__intro { grid-template-columns: 56px 1fr; gap: 12px; }
  .profile-settings__intro .button { grid-column: 1 / -1; width: 100%; text-align: center; }
  .profile-avatar-editor,
  .profile-avatar-image,
  .profile-avatar-fallback { width: 54px; height: 54px; border-radius: 16px; }
  .profile-settings__intro h2 { font-size: 21px; }
  .profile-settings-grid,
  .auto-payout-panel { grid-template-columns: 1fr; }
  .profile-settings-actions { display: grid; }
  .profile-settings-actions .button { width: 100%; }
}
