/* Exironex – Crypto Exchange
   Brand color: #578ba8
   © 2026 Exironex */

:root {
  --brand: #578ba8;
  --brand-hover: #6a9fbc;
  --brand-muted: rgba(87, 139, 168, 0.15);
  --bg: #0d1117;
  --bg-elevated: #161b22;
  --bg-card: #21262d;
  --border: #30363d;
  --text: #e6edf3;
  --text-muted: #8b949e;
  --green: #3fb950;
  --red: #f85149;
  --radius: 8px;
  --radius-lg: 12px;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --scrollbar-track: var(--bg-elevated);
  --scrollbar-thumb: var(--border);
  --scrollbar-thumb-hover: var(--text-muted);
}

body[data-theme="light"],
[data-theme="light"] {
  --bg: #f6f8fa;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: #d0d7de;
  --text: #1f2328;
  --text-muted: #656d76;
  --brand-muted: rgba(87, 139, 168, 0.12);
}


*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar – WebKit (Chrome, Safari, Edge) */
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 4px;
  border: 2px solid var(--scrollbar-track);
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-thumb-hover);
}

*::-webkit-scrollbar-corner {
  background: var(--scrollbar-track);
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
}

/* Keep header clickable above Settings/Profile full-window overlay */
body.body-settings-open .header,
body.body-profile-open .header {
  z-index: 150;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo:hover {
  color: var(--text);
  opacity: 0.9;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9375rem;
}

.nav a:hover {
  color: var(--text);
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--header-action-gap, 0.65rem);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--header-action-gap, 0.65rem);
}

.header-actions .btn {
  height: 40px;
  padding: 0 1rem;
  font-size: 0.9375rem;
  box-sizing: border-box;
}

.header-right-icons {
  display: flex;
  align-items: center;
  gap: var(--header-action-gap, 0.65rem);
}

.header-profile-wrap {
  position: relative;
}

.header-profile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.header-profile-btn:hover {
  color: var(--brand);
  background: var(--brand-muted);
}

.header-profile-btn[aria-expanded="true"] {
  color: var(--brand);
  background: var(--brand-muted);
}

.header-profile-icon {
  flex-shrink: 0;
}

.header-profile-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  min-width: 140px;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}

.header-profile-wrap.open .header-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-profile-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.header-theme-wrap,
.header-lang-wrap {
  position: relative;
}

.header-lang-label {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.header-admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  text-decoration: none;
  box-sizing: border-box;
  white-space: nowrap;
}
.header-admin-btn:hover {
  color: var(--brand);
  background: var(--brand-muted);
}

.header-lang-wrap .header-theme-btn {
  width: auto;
  min-width: 40px;
  height: 40px;
  padding: 0 1rem;
  font-size: 0.9375rem;
}

.header-theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.header-theme-btn:hover {
  color: var(--brand);
  background: var(--brand-muted);
}

.header-theme-btn[aria-expanded="true"] {
  color: var(--brand);
  background: var(--brand-muted);
}

.header-theme-icon {
  flex-shrink: 0;
}

body[data-theme="light"] .header-theme-icon-light,
body[data-theme="dark"] .header-theme-icon-dark {
  display: block;
}

body[data-theme="light"] .header-theme-icon-dark,
body[data-theme="dark"] .header-theme-icon-light {
  display: none;
}

.header-theme-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  min-width: 140px;
  padding: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 50;
}

.header-theme-wrap.open .header-theme-dropdown,
.header-lang-wrap.open .header-theme-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.header-theme-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  padding: 0 0.25rem;
}

.header-theme-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  width: 100%;
  transition: background 0.2s, color 0.2s;
}

.header-theme-option:hover {
  background: var(--bg-elevated);
  color: var(--brand);
}

.header-theme-option input {
  margin: 0;
  accent-color: var(--brand);
}

.header-theme-option input:checked + span {
  color: var(--brand);
  font-weight: 600;
}

.header-profile-item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: none;
  border: none;
  border-radius: var(--radius);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  box-sizing: border-box;
}

.header-profile-item:hover {
  background: var(--bg-elevated);
  color: var(--brand);
}

.header-profile-item-logout {
  font-family: inherit;
  color: var(--text-muted);
}

.header-profile-item-logout:hover {
  color: var(--red);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: var(--brand-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-card);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn-outline:hover,
.btn-outline:focus,
.btn-outline:active {
  background: var(--brand-muted);
  color: var(--brand);
  border-color: var(--brand);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* User notifications (admin confirmed/deleted request) – full width with header */
.user-notifications-wrap {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

.user-notifications-wrap.user-notifications-hidden {
  display: none;
}

.user-notifications-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}

.user-notifications-list {
  flex: 1;
  min-width: 0;
}

.user-notification-item {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.user-notification-item:last-child {
  margin-bottom: 0;
}

.user-notifications-dismiss {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  color: var(--text-muted);
  border-radius: var(--radius);
}

.user-notifications-dismiss:hover {
  color: var(--text);
  background: var(--bg);
}

/* Hero */
.hero {
  padding: 4rem 1.5rem 5rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--brand-muted) 0%, transparent 55%);
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Section – scroll margin so anchor links (Markets, Wallet, Fees) don’t sit under sticky header */
.section {
  padding: 3rem 1.5rem;
  scroll-margin-top: 5rem;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section h2 {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 700;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--text-muted);
  max-width: 560px;
}

/* Wallet – island (rounded block with distinct background) */
.wallet-section {
  margin: 0;
  padding: 2rem 1.5rem;
  background: var(--bg-elevated);
}

.wallet-section .container {
  background: var(--bg);
  border-radius: 1.5rem;
  padding: 2.5rem 1.5rem;
  box-shadow: 0 0 0 1px var(--border);
  overflow: hidden;
}

/* Wallet switch (Phantom-style) */
.wallet-switch {
  display: flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 1.5rem;
  gap: 0;
}

.wallet-switch-option {
  flex: 1;
  padding: 0.5rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wallet-switch-option:hover {
  color: var(--text);
}

.wallet-switch-option.active {
  background: var(--brand);
  color: #fff;
}

.wallet-switch-option.active:hover {
  color: #fff;
  filter: brightness(1.1);
}

.wallet-panel {
  display: block;
}

.wallet-panel-hidden {
  display: none;
}

.wallet-subsection {
  margin-bottom: 2rem;
}

.wallet-subsection:last-child {
  margin-bottom: 0;
}

.wallet-subsection-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.wallet-history-list,
.profile-wallet-history {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.9375rem;
}

.wallet-history-empty {
  margin: 0;
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.wallet-history-row {
  padding: 0.85rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wallet-history-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wallet-history-type {
  font-weight: 600;
  color: var(--brand);
  font-size: 0.9375rem;
}

.wallet-history-row-transfer-out .wallet-history-type {
  color: var(--red);
}

.wallet-history-row-transfer-in .wallet-history-type {
  color: var(--green);
}

.wallet-history-date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.wallet-history-detail {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
  word-break: break-all;
}

.wallet-assets {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wallet-asset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 100px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wallet-asset-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: contain;
}

.wallet-asset:hover {
  border-color: var(--brand);
}

.wallet-asset-highlight {
  border-color: var(--brand);
  background: var(--brand-muted);
  box-shadow: 0 0 0 1px var(--brand);
}

.wallet-asset-symbol {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
}

.wallet-asset-name {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.wallet-asset-name small {
  font-size: 0.75rem;
  color: var(--brand);
}

.wallet-asset-balance {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand);
}

.wallet-asset-usd {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.wallet-asset-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.wallet-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-muted);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.wallet-btn:hover {
  background: rgba(87, 139, 168, 0.25);
}

.wallet-login-wrap {
  max-width: 360px;
  padding: 1.5rem 0;
}

.wallet-login-text {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.wallet-login-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.wallet-auth-message {
  margin: 0 0 1rem;
  padding: 0.75rem;
  font-size: 0.875rem;
  border-radius: var(--radius);
  background: var(--brand-muted);
  color: var(--brand);
}

.wallet-auth-message.wallet-auth-message-error {
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
}

.wallet-auth-switch {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.wallet-auth-link {
  padding: 0;
  font-size: inherit;
  font-weight: 600;
  color: var(--brand);
  background: none;
  border: none;
  cursor: pointer;
}

.wallet-auth-link:hover {
  color: var(--brand-hover);
  text-decoration: underline;
}

.wallet-login-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.wallet-login-form .wallet-modal-label {
  margin-top: 0.75rem;
}

.wallet-login-form .wallet-modal-label:first-child {
  margin-top: 0;
}

.wallet-login-form .wallet-modal-input {
  margin-bottom: 0.25rem;
}

.wallet-login-form button[type="submit"] {
  margin-top: 1.25rem;
}

.wallet-content-wrap {
  display: block;
}

.wallet-content-wrap.wallet-content-hidden {
  display: none;
}

.wallet-content-hidden {
  display: none !important;
}

.wallet-user-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.wallet-user-name {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
}

.wallet-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wallet-modal.wallet-modal-hidden {
  display: none;
}

.wallet-modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.7);
  cursor: pointer;
}

.wallet-modal-box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.wallet-modal-x {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  z-index: 10;
  flex-shrink: 0;
}

.wallet-modal-x:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.settings-modal-box {
  max-width: 440px;
  max-height: 95vh;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.settings-modal-box::-webkit-scrollbar {
  display: none;
}

.wallet-modal-box .wallet-modal-close {
  display: block;
  width: 100%;
  margin-top: 2rem;
  padding: 0.65rem 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.wallet-modal-box .wallet-modal-close:hover {
  color: var(--text);
  background: var(--bg-elevated);
  border-color: var(--border);
}

.settings-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.wallet-modal-box .settings-modal-actions .wallet-modal-close,
.wallet-modal-box .settings-modal-actions .btn {
  min-width: 0;
  width: 100%;
  margin-top: 0;
  box-sizing: border-box;
  padding: 0.65rem 1rem;
  display: block;
  text-align: center;
}

.wallet-deposit-agree {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
  min-height: 1.5rem;
}

.wallet-deposit-agree input[type="checkbox"] {
  flex-shrink: 0;
  margin: 0;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: middle;
}

.wallet-deposit-agree-text {
  flex: 1;
  min-width: 0;
}

.wallet-withdraw-agree {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 1rem 0;
  cursor: pointer;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--text);
  min-height: 1.5rem;
}

.wallet-withdraw-agree input[type="checkbox"] {
  flex-shrink: 0;
  margin: 0;
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--brand);
  cursor: pointer;
  vertical-align: middle;
}

.wallet-withdraw-agree-text {
  flex: 1;
  min-width: 0;
}

.wallet-modal-box .wallet-deposit-request-btn {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.65rem 1rem;
  text-align: center;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.wallet-modal-box .wallet-deposit-request-btn:hover:not(:disabled) {
  background: var(--brand-hover);
  color: #fff;
}

.wallet-modal-box .wallet-deposit-request-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.settings-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

/* Full-window settings page (like admin dashboard) */
body.body-settings-open main,
body.body-profile-open main {
  display: none !important;
}

.settings-page {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  overflow: auto;
  display: none;
}

.settings-page.settings-page-visible {
  display: block;
}

.settings-page-inner {
  padding: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.settings-page-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--brand);
  font-size: 0.9375rem;
  text-decoration: none;
}

.settings-page-back:hover {
  color: var(--brand-hover);
}

.settings-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
}

.settings-page-message {
  margin-bottom: 1.5rem;
}

.settings-page-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.settings-page-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.settings-page .settings-section-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.settings-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.settings-page-actions .btn {
  padding: 0.65rem 1.25rem;
  font-weight: 600;
}

/* Full-window profile page (like admin dashboard) */
.profile-page {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  overflow: auto;
  display: none;
}

.profile-page.profile-page-visible {
  display: block;
}

.profile-page-inner {
  padding: 2rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-page-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  color: var(--brand);
  font-size: 0.9375rem;
  text-decoration: none;
}

.profile-page-back:hover {
  color: var(--brand-hover);
}

.profile-page-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--text);
}

.profile-page-message {
  margin-bottom: 1.5rem;
}

.profile-page-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-page-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-history-section-hidden {
  display: none;
}

.profile-history-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.profile-page-actions .btn {
  margin-top: 1rem;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
}

.profile-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.profile-value {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
}

.profile-bio-display {
  white-space: pre-wrap;
  min-height: 1.5em;
}

.profile-bio-textarea {
  min-height: 80px;
  resize: none;
  margin-bottom: 0.75rem;
}

.settings-theme-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-theme-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.settings-theme-option:hover {
  border-color: var(--brand);
  background: var(--brand-muted);
}

.settings-theme-option input {
  margin: 0;
  accent-color: var(--brand);
}

.settings-theme-option input:checked + span {
  font-weight: 600;
  color: var(--brand);
}

.wallet-modal-crypto-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wallet-modal-crypto-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  text-align: left;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.wallet-modal-crypto-item:hover {
  border-color: var(--brand);
  background: var(--brand-muted);
}

.wallet-modal-crypto-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.wallet-modal-crypto-symbol {
  font-weight: 600;
  font-family: var(--font-mono);
}

.wallet-modal-crypto-name {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.wallet-modal-back {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0;
  font-size: 0.9375rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--brand);
}

.wallet-modal-back:hover {
  color: var(--brand-hover);
}

.wallet-modal-title {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.wallet-modal-body {
  margin-bottom: 1rem;
}

.wallet-modal-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.wallet-deposit-intro {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.wallet-deposit-intro-title {
  margin: 0 0 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}

.wallet-deposit-intro-note {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.wallet-modal-note.wallet-deposit-info {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.wallet-modal-address-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

.wallet-modal-address {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  word-break: break-all;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.wallet-modal-soon {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.wallet-withdraw-form input[type="number"]::-webkit-inner-spin-button,
.wallet-withdraw-form input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.wallet-withdraw-form input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.wallet-withdraw-form .wallet-modal-label {
  margin-top: 0.75rem;
}

.wallet-withdraw-form .wallet-modal-label:first-child {
  margin-top: 0;
}

.wallet-modal-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.25rem;
}

.wallet-withdraw-max {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.wallet-withdraw-fee-note {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.wallet-withdraw-fee-icon {
  flex-shrink: 0;
  margin-top: 0.1em;
  color: var(--text-muted);
}

.wallet-withdraw-fee-icon svg {
  display: block;
}

.wallet-withdraw-error {
  display: none;
}

.wallet-withdraw-form button[type="submit"] {
  margin-top: 1rem;
}

.wallet-asset-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: lowercase;
}

.wallet-note {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

/* Fees */
.fees-section {
  background: var(--bg-elevated);
}

.fees-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.fee-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.fee-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 600;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.fee-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.fee-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Markets */
.markets {
  background: var(--bg-elevated);
}

.section-head .markets-quote-note {
  flex: 0 0 100%;
  margin: 0.25rem 0 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.section-head .markets-quote-note strong {
  color: var(--brand);
}

.markets-search {
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  max-width: 360px;
  padding: 0.6rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-muted);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.markets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.markets-table th,
.markets-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.markets-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.markets-table tbody tr {
  transition: background 0.15s;
}

.markets-table tbody tr:hover {
  background: var(--bg-elevated);
}

.markets-table tbody tr:last-child td {
  border-bottom: none;
}

.text-right {
  text-align: right;
}

.pair {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pair-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  flex-shrink: 0;
}

.pair-symbol {
  font-weight: 600;
  color: var(--text);
}

.pair-quote {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.price {
  font-family: var(--font-mono);
  font-weight: 500;
}

.change-positive {
  color: var(--green);
}

.change-negative {
  color: var(--red);
}

.volume {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.trade-btn {
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-muted);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
}

.trade-btn:hover {
  background: rgba(87, 139, 168, 0.25);
}

.link {
  font-weight: 600;
  font-size: 0.9375rem;
}

/* Footer – Binance-style */
.footer {
  padding: 3rem 1.5rem 2.5rem;
  background: var(--bg);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2.5rem 3rem;
  margin-bottom: 2.5rem;
  align-items: start;
}

.footer-links-group {
  display: flex;
  gap: 2.5rem 3rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-brand .logo {
  display: inline-flex;
  margin-bottom: 1rem;
}

.footer-brand .logo img {
  width: 36px;
  height: 36px;
}

.footer-brand p {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.5;
}

.footer-links h4 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0;
  text-transform: none;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

.footer-links a {
  color: var(--brand);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-hover);
}

.footer-bottom {
  padding-top: 1.5rem;
}

.trademark {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .header-actions .btn:first-child {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-links-group {
    justify-content: flex-start;
  }
}

@media (max-width: 600px) {
  .hero-cta {
    flex-direction: column;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links-group {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-brand p {
    max-width: none;
  }
}

/* Live Support widget – bottom right */
.live-support-wrap {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
}
.live-support-wrap.live-support-hidden {
  display: none !important;
}
.live-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.live-support-btn:hover {
  background: var(--brand-hover);
  filter: brightness(1.05);
}
.live-support-btn {
  position: relative;
}
.live-support-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 14px;
  height: 14px;
  background: var(--red);
  border-radius: 50%;
  display: none;
  pointer-events: none;
}
.live-support-wrap.live-support-has-unread .live-support-badge {
  display: block;
}
.live-support-btn svg {
  flex-shrink: 0;
}
.live-support-panel {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 2rem);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  max-height: 420px;
}
.live-support-panel.live-support-panel-open {
  display: flex;
}
.live-support-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}
.live-support-login-prompt {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.live-support-login-prompt.live-support-login-hidden {
  display: none !important;
}
.live-support-login-text {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.live-support-login-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.live-support-chat-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.live-support-chat-wrap.live-support-chat-wrap-hidden {
  display: none !important;
}
.live-support-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  border-radius: var(--radius);
  transition: color 0.2s, background 0.2s;
}
.live-support-close:hover {
  color: var(--text);
  background: var(--bg-elevated);
}
.live-support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 180px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.live-support-empty {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin: 0;
}
.live-support-thread {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.live-support-msg {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.live-support-msg-user {
  background: var(--brand-muted);
  color: var(--text);
  align-self: flex-end;
  max-width: 85%;
}
.live-support-msg-admin {
  background: var(--border);
  color: var(--text);
  align-self: flex-start;
  max-width: 85%;
}
.live-support-msg-date {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.live-support-input-wrap {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}
.live-support-input-wrap .live-support-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.live-support-input-wrap .live-support-input::placeholder {
  color: var(--text-muted);
}
.live-support-input-wrap .live-support-send {
  padding: 0.5rem 1rem;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.live-support-input-wrap .live-support-send:hover {
  background: var(--brand-hover);
}
.live-support-wrap .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
