:root {
  --bg: #070b16;
  --bg-soft: #0d1324;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-solid: #111827;
  --panel-strong: #141c2f;
  --text: #eef4ff;
  --muted: #8d9ab3;
  --muted-strong: #b8c3d8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #7c5cff;
  --accent-2: #0ea5e9;
  --accent-3: #22c55e;
  --danger: #fb4d62;
  --warning: #f59e0b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 8px;
  --radius-lg: 18px;
  --container: 1180px;
}

[data-theme="light"] {
  --bg: #eef4fb;
  --bg-soft: #f8fbff;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #ffffff;
  --panel-strong: #eef4ff;
  --text: #101827;
  --muted: #617089;
  --muted-strong: #35445d;
  --line: rgba(71, 85, 105, 0.16);
  --accent: #5b45e8;
  --accent-2: #0877b9;
  --shadow: 0 24px 70px rgba(42, 58, 95, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(124, 92, 255, 0.2), transparent 28rem),
    radial-gradient(circle at 84% 12%, rgba(14, 165, 233, 0.18), transparent 26rem),
    linear-gradient(180deg, var(--bg), var(--bg-soft));
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

[data-theme="light"] body::before {
  opacity: 0.2;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(18px);
}

[data-theme="light"] .site-header {
  background: rgba(248, 251, 255, 0.82);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(92, 124, 255, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-strong);
  font-size: 14px;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.danger-button,
.soft-button,
.icon-button,
.language-button,
.notification-button,
.avatar-button,
.menu-button {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
  border-radius: var(--radius);
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.primary-button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  box-shadow: 0 14px 36px rgba(80, 103, 255, 0.3);
}

.danger-button {
  border: 0;
  background: linear-gradient(135deg, #fb4d62, #e11d48);
  color: white;
  font-weight: 700;
}

.soft-button {
  background: rgba(124, 92, 255, 0.12);
  border-color: rgba(124, 92, 255, 0.25);
  color: var(--text);
}

.primary-button:hover,
.ghost-button:hover,
.soft-button:hover,
.danger-button:hover,
.icon-button:hover,
.language-button:hover,
.notification-button:hover,
.avatar-button:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 92, 255, 0.42);
}

.icon-button,
.avatar-button,
.notification-button,
.menu-button {
  width: 42px;
  padding: 0;
}

.notification-button {
  position: relative;
}

.notification-button strong {
  position: absolute;
  top: -8px;
  right: -8px;
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 11px;
}

.theme-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: inset 6px -4px 0 rgba(255, 255, 255, 0.3);
}

.language-switcher {
  position: relative;
}

.language-button {
  min-width: 82px;
}

.language-menu {
  position: absolute;
  right: 0;
  top: 50px;
  width: 220px;
  display: none;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.language-menu.is-open {
  display: grid;
}

.language-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}

.language-menu button:hover {
  background: rgba(124, 92, 255, 0.12);
}

.avatar-button span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 800;
  font-size: 12px;
}

.menu-button {
  display: none;
  flex-direction: column;
  gap: 4px;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  left: 14px;
  right: 14px;
  z-index: 49;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.mobile-menu.is-open {
  display: grid;
}

.mobile-menu a {
  padding: 13px 12px;
  border-radius: 10px;
  color: var(--muted-strong);
}

.mobile-menu a:hover {
  background: rgba(124, 92, 255, 0.12);
  color: var(--text);
}

#app {
  min-height: calc(100vh - 76px);
}

.page {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 30px;
  align-items: center;
  min-height: 660px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(124, 92, 255, 0.28);
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  color: #b9c7ff;
  font-size: 13px;
  font-weight: 700;
}

[data-theme="light"] .eyebrow {
  color: #4a3fd4;
}

.hero h1,
.section-heading h2,
.auth-card h1 {
  margin: 18px 0 16px;
  max-width: 720px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero p,
.section-heading p,
.auth-card p {
  color: var(--muted-strong);
  line-height: 1.65;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.stat-card,
.panel,
.exchange-card,
.rate-card,
.feature-card,
.dashboard-card,
.admin-card,
.auth-card,
.modal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 18px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
}

.exchange-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.exchange-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(124, 92, 255, 0.22), transparent 32%),
    radial-gradient(circle at 95% 0%, rgba(14, 165, 233, 0.24), transparent 32%);
}

.exchange-card > * {
  position: relative;
}

.exchange-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label,
.field-row label {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.input-wrap,
.select-wrap {
  position: relative;
}

input,
select,
textarea {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255, 255, 255, 0.88);
}

textarea {
  min-height: 120px;
  padding: 14px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124, 92, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.12);
}

.input-wrap.is-valid::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  transform: translateY(-50%);
  background:
    linear-gradient(135deg, #22c55e, #84cc16),
    #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.input-wrap.is-valid::before {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  z-index: 1;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translateY(-58%) rotate(45deg);
}

.exchange-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 10px;
}

.rate-line,
.help-line,
.error-line {
  color: var(--muted);
  font-size: 13px;
}

.error-line {
  color: var(--danger);
}

.swap-divider {
  display: flex;
  justify-content: center;
  margin: -2px 0;
}

.swap-divider button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.section {
  padding: 38px 0;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4.5vw, 52px);
}

.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.rate-card,
.dashboard-card,
.admin-card,
.panel {
  padding: 18px;
}

.feature-card h3,
.dashboard-card h3,
.admin-card h3,
.panel h3 {
  margin: 0 0 8px;
}

.feature-card p,
.dashboard-card p,
.admin-card p,
.panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.rate-card {
  display: grid;
  gap: 8px;
}

.rate-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.coin-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.coin-dot {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--accent);
}

.rate-price {
  font-size: 22px;
  font-weight: 850;
}

.positive {
  color: #38d67a;
}

.negative {
  color: #fb7185;
}

.footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding: 36px 0 46px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.footer h4 {
  margin: 0 0 12px;
}

.footer a,
.footer p {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-layout {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 76px);
  padding: 38px 16px;
}

.auth-card {
  width: min(520px, 100%);
  padding: 26px;
}

.auth-card h1 {
  font-size: clamp(34px, 6vw, 48px);
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.password-tools {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.strength {
  display: flex;
  gap: 4px;
  flex: 1;
}

.strength span {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.24);
}

.strength[data-level="1"] span:nth-child(-n + 1),
.strength[data-level="2"] span:nth-child(-n + 2),
.strength[data-level="3"] span:nth-child(-n + 3),
.strength[data-level="4"] span:nth-child(-n + 4) {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.sidebar button,
.sidebar a {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
}

.sidebar button.is-active,
.sidebar button:hover,
.sidebar a:hover {
  color: var(--text);
  background: rgba(124, 92, 255, 0.12);
}

.dashboard-main {
  display: grid;
  gap: 16px;
}

.dashboard-top {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  background: rgba(124, 92, 255, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.status-badge.success {
  background: #16a34a;
}

.status-badge.warning {
  background: #d97706;
}

.status-badge.danger {
  background: #e11d48;
}

.activity-list,
.order-list,
.notification-list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

[data-theme="light"] .list-item {
  background: rgba(255, 255, 255, 0.68);
}

.list-item strong {
  display: block;
}

.list-item span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.chart-panel {
  overflow: hidden;
  min-height: 420px;
}

.chart-panel iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-solid);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(10px);
}

.modal-card {
  width: min(680px, 100%);
  max-height: min(780px, 92vh);
  overflow: auto;
  padding: 22px;
}

.modal-card header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 16px;
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.qr-box img {
  width: 190px;
  height: 190px;
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
}

.floating-panel {
  position: fixed;
  right: 20px;
  top: 86px;
  z-index: 70;
  display: none;
  width: min(390px, calc(100vw - 32px));
  max-height: 70vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.floating-panel.is-open {
  display: block;
}

.support-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 62;
}

.support-fab button {
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.32);
  font-weight: 800;
  font-size: 12px;
}

.support-widget {
  position: fixed;
  right: 22px;
  bottom: 110px;
  z-index: 72;
  display: none;
  width: min(380px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.support-widget.is-open {
  display: block;
}

.support-widget header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.support-widget header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.support-widget header button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.support-messages {
  display: grid;
  gap: 8px;
  height: 280px;
  overflow: auto;
  padding: 14px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(124, 92, 255, 0.14);
  color: var(--text);
}

.chat-bubble.admin {
  margin-left: auto;
  background: rgba(14, 165, 233, 0.14);
}

.support-widget form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.support-widget form input {
  min-height: 44px;
}

.support-widget form button {
  border: 0;
  border-radius: 10px;
  padding: 0 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.toast-stack {
  position: fixed;
  right: 22px;
  top: 92px;
  z-index: 90;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
}

.toast {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}

.hidden,
.auth-only-user,
.auth-only-admin {
  display: none !important;
}

.is-user .auth-only-user,
.is-admin .auth-only-admin {
  display: inline-flex !important;
}

.is-user .mobile-menu .auth-only-user,
.is-admin .mobile-menu .auth-only-admin {
  display: block !important;
}

.is-user .auth-only-guest,
.is-admin .auth-only-guest {
  display: none !important;
}

@media (max-width: 980px) {
  .desktop-nav,
  .header-actions .auth-only-guest {
    display: none !important;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 24px;
  }

  .dashboard-layout,
  .dashboard-top,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .sidebar button,
  .sidebar a {
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 66px;
    padding: 0 14px;
  }

  .brand span {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .mobile-menu {
    top: 72px;
  }

  .language-button {
    min-width: 70px;
    padding: 0 10px;
  }

  .page {
    width: min(100% - 22px, var(--container));
    padding: 24px 0 56px;
  }

  .hero h1,
  .section-heading h2,
  .auth-card h1 {
    letter-spacing: -0.04em;
  }

  .hero-stats,
  .exchange-row,
  .social-row {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .support-fab {
    right: 14px;
    bottom: 14px;
  }

  .support-fab button {
    width: 62px;
    height: 62px;
  }

  .support-widget {
    right: 11px;
    bottom: 84px;
  }
}


/* ExchangeWales v2 polish */
html, body { background-color: var(--bg); overscroll-behavior: none; }
.premium-badge { display:inline-flex; align-items:center; width:max-content; max-width:100%; border-radius:999px; padding:.55rem .85rem; background:linear-gradient(135deg, rgba(124,92,255,.18), rgba(14,165,233,.14)); border:1px solid rgba(124,92,255,.32); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 36px rgba(80,103,255,.12); }
.section-heading { gap: 18px; margin-bottom: 24px; }
.section-heading h2 { margin-top: 12px; }
.feature-card, .panel, .exchange-card, .auth-card, .dashboard-card, .admin-card, .stat-card, .rate-card { box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04); }
.coin-pill { display:inline-flex; align-items:center; gap:8px; padding:8px 11px; border:1px solid var(--line); background:rgba(255,255,255,.045); border-radius:999px; font-weight:800; }
.coin-dot { width:11px; height:11px; border-radius:999px; box-shadow:0 0 0 5px rgba(255,255,255,.045); }
.phone-combo { display:grid; grid-template-columns:minmax(125px, .75fr) 1fr; gap:10px; }
.phone-combo select, .phone-combo input, .copy-line input, .copy-line button { min-height:52px; }
.copy-line { display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.password-wrap { display:grid; grid-template-columns:1fr auto auto; gap:8px; align-items:center; }
.mini-button { border:1px solid var(--line); background:rgba(255,255,255,.045); color:var(--text); border-radius:10px; padding:0 10px; min-height:36px; }
.terms-line { display:flex; align-items:flex-start; gap:12px; line-height:1.45; color:var(--muted-strong); }
.terms-line input { width:18px; height:18px; margin-top:3px; accent-color: var(--accent); }
.auth-note { border:1px solid var(--line); background:rgba(124,92,255,.08); border-radius:14px; padding:14px 16px; color:var(--muted-strong); margin: 10px 0 18px; }
.order-card { width:100%; display:flex; justify-content:space-between; gap:14px; text-align:left; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.04); color:var(--text); padding:16px; margin-bottom:12px; }
.order-card div { display:grid; gap:4px; }
.order-card span:not(.status-badge) { color:var(--muted); }
.bell-icon { font-size:18px; line-height:1; }
.footer-bottom { margin-top:28px; padding-top:18px; border-top:1px solid var(--line); color:var(--muted); font-size:14px; }
.toast { border-radius:16px; box-shadow: var(--shadow); }

@media (max-width: 760px) {
  .site-header { min-height:68px; padding:0 14px; }
  .brand span { display:none; }
  .hero { gap:28px; }
  .hero h1 { font-size: clamp(44px, 13vw, 74px); line-height:.92; }
  .hero-stats, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr !important; }
  .feature-card { padding:18px; }
  .feature-card h3 { margin:8px 0; }
  .dashboard-layout, .admin-layout { grid-template-columns:1fr !important; }
  .sidebar, .admin-tabs { display:flex; overflow-x:auto; gap:8px; padding-bottom:8px; -webkit-overflow-scrolling: touch; }
  .sidebar > *, .admin-tabs > * { white-space:nowrap; flex:0 0 auto; }
  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display:block; width:100%; }
  .table-wrap thead { display:none; }
  .table-wrap tr { border:1px solid var(--line); border-radius:18px; margin-bottom:14px; padding:12px; background:rgba(255,255,255,.035); }
  .table-wrap td { border:0 !important; padding:8px 4px !important; }
  .status-badge { align-self:flex-start; min-width:max-content; }
  .support-fab { bottom: 84px; right: 16px; }
  .support-fab button { width:72px; height:72px; font-size:15px; }
  .modal-card { width: calc(100vw - 24px); max-height: calc(100vh - 48px); overflow:auto; border-radius:22px; padding:20px; }
  .phone-combo { grid-template-columns: 1fr; }
  .copy-line { grid-template-columns: 1fr; }
  .header-actions .auth-only-guest.primary-button { display:none; }
  .notification-button span:first-child { font-size:0; }
  .notification-button .bell-icon { font-size:20px; }
}
.auth-links { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; color:var(--muted-strong); }
.link-button { border:0; background:none; padding:0; color:var(--muted-strong); text-decoration:underline; }

/* ExchangeWales v3 professional polish */
:root { --radius: 16px; --radius-xl: 28px; }
html, body { overscroll-behavior-y: none; background: var(--bg); }
.site-header { padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.brand-mark { border-radius: 15px; }
.premium-badge { display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:linear-gradient(135deg,rgba(124,92,255,.22),rgba(14,165,233,.18)); border:1px solid rgba(255,255,255,.14); box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 16px 40px rgba(7,10,26,.22); }
.hero-pro { align-items: stretch; }
.hero-pro h1 { letter-spacing:-.07em; }
.big-action { min-height:52px; padding-inline:22px; border-radius:18px; }
.compact-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
.compact-section { margin-top: 36px; }
.section-heading { gap: 18px; align-items:flex-end; }
.section-heading h2 { margin: 6px 0 8px; }
.section-heading p { max-width: 560px; line-height:1.55; }
.asset-strip { display:grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.asset-chip-card { display:grid; grid-template-columns: 42px 1fr; grid-template-areas:'orb main' 'orb networks'; align-items:center; gap:3px 10px; min-height:76px; padding:14px; border:1px solid var(--line); border-radius:22px; background:linear-gradient(145deg,rgba(255,255,255,.105),rgba(255,255,255,.035)); box-shadow: 0 16px 46px rgba(0,0,0,.13); }
.coin-orb { grid-area: orb; width:42px; height:42px; border-radius:16px; display:grid; place-items:center; font-weight:900; color:white; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,.55), transparent 24px), var(--coin); box-shadow:0 12px 30px color-mix(in srgb, var(--coin) 32%, transparent); }
.asset-chip-card strong { display:block; font-size:16px; letter-spacing:-.02em; }
.asset-chip-card span { display:block; color:var(--muted); font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.asset-chip-card small { grid-area: networks; color:var(--muted-strong); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.step-card > span { width:36px; height:36px; display:grid; place-items:center; border-radius:14px; background:rgba(124,92,255,.18); color:var(--text); font-weight:900; }
.v3-auth { max-width: 1120px; margin: 0 auto; display:grid; grid-template-columns: minmax(0, 560px) minmax(320px, 1fr); gap: 22px; align-items:center; }
.auth-card-pro { border-radius:32px; padding:28px; box-shadow:0 28px 90px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.12); }
.wide-auth-card { max-width: 700px; width: min(700px, 100%); }
.auth-brand-block { display:flex; align-items:center; gap:16px; margin-bottom:14px; }
.auth-brand-block img { width:58px; height:58px; border-radius:20px; box-shadow:0 16px 44px rgba(99,102,241,.28); }
.auth-lead { color:var(--muted-strong); line-height:1.58; margin-bottom:22px; }
.auth-side-panel { min-height:420px; padding:28px; border-radius:32px; border:1px solid var(--line); background: radial-gradient(circle at top right, rgba(14,165,233,.25), transparent 240px), radial-gradient(circle at bottom left, rgba(124,92,255,.22), transparent 240px), var(--panel); box-shadow: var(--shadow); }
.auth-side-panel h2 { margin:10px 0 24px; font-size:34px; letter-spacing:-.04em; }
.auth-checks { display:grid; gap:12px; padding:0; margin:0; list-style:none; }
.auth-checks li { padding:12px 14px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.055); }
.pro-form .input-wrap, .pro-form input, .pro-form select, .pro-form textarea { border-radius:16px; }
.auth-row-inline { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.terms-line.compact { display:flex; align-items:flex-start; gap:10px; padding:10px 12px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.04); font-size:13px; line-height:1.35; }
.terms-line.compact input { width:18px; height:18px; flex:0 0 auto; margin-top:0; }
.auth-bottom-note { margin-top:18px; color:var(--muted-strong); }
.auth-bottom-note a, .link-button { color:var(--accent-2); font-weight:800; }
.pro-phone { display:grid; grid-template-columns:minmax(126px, 170px) 1fr; gap:10px; }
.checklist-panel .activity-list { margin-top:18px; }
.payment-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:18px; }
.back-button { flex:0 0 auto; }
.payment-screen { display:grid; grid-template-columns:minmax(0,1.3fr) 300px; gap:22px; align-items:start; }
.pro-qr { padding:18px; border-radius:28px; background:rgba(255,255,255,.06); text-align:center; }
.pro-qr img { width:100%; max-width:260px; border-radius:20px; background:#fff; padding:12px; }
.pro-qr span { display:block; color:var(--muted); font-size:13px; margin-top:8px; }
.sticky-modal-actions { position:sticky; bottom:0; padding-top:14px; background:linear-gradient(transparent,var(--panel-solid) 22%); }
.active-order-panel .hero-actions { margin-top:20px; }
.settings-stack { display:grid; gap:16px; }
.session-line { align-items:center; }
.kyc-upload-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.upload-tile { min-height:110px; display:grid; place-items:center; text-align:center; border:1px dashed rgba(148,163,184,.4); border-radius:20px; background:rgba(255,255,255,.04); color:var(--muted-strong); font-weight:800; }
.upload-tile input { width:100%; padding:10px; font-size:12px; }
.verification-pending { background:linear-gradient(145deg,rgba(245,158,11,.12),rgba(124,92,255,.08)); }
.profile-pop-head { display:flex; gap:12px; align-items:center; }
.avatar-large { width:52px; height:52px; border-radius:19px; display:grid; place-items:center; background:linear-gradient(135deg,var(--accent),var(--accent-2)); color:#fff; font-weight:900; }
.profile-actions button { width:100%; justify-content:flex-start; }
.admin-mobile-card { display:grid; gap:10px; padding:16px; margin:12px 0; border:1px solid var(--line); border-radius:22px; background:rgba(255,255,255,.045); }
.admin-mobile-card > div:first-child { display:flex; justify-content:space-between; gap:12px; }
.admin-mobile-card strong { display:block; }
.admin-mobile-card span { color:var(--muted); font-size:13px; }
.support-reply-form { display:grid; gap:10px; }
.support-reply-form textarea { min-height:84px; resize:vertical; }
.support-fab button { border-radius:999px; min-height:48px; padding:0 16px; display:flex; gap:8px; align-items:center; box-shadow:0 18px 50px rgba(14,165,233,.26); }
.support-fab span { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.16); }
.support-file { width:42px; min-height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:14px; background:var(--panel); cursor:pointer; }
.support-file input { display:none; }
.modal-card { max-height: calc(100vh - 24px); overflow:auto; overscroll-behavior:contain; }
.table-wrap table { min-width: 820px; }
.order-card { align-items:center; }
.order-card .status-badge { white-space:nowrap; }
.status-badge.danger, .status-badge.rejected, .status-badge.expired { background:rgba(251,77,98,.16); border-color:rgba(251,77,98,.32); color:#ff8f9d; }
[data-theme="light"] .asset-chip-card, [data-theme="light"] .auth-side-panel, [data-theme="light"] .admin-mobile-card { background:rgba(255,255,255,.75); }
@media (max-width: 980px) {
  .desktop-nav, .header-actions > .auth-only-guest { display:none; }
  .menu-button { display:inline-flex; }
  .v3-auth { grid-template-columns:1fr; }
  .auth-side-panel { min-height:auto; }
  .asset-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .payment-screen { grid-template-columns:1fr; }
  .qr-box { order:-1; }
  .dashboard-layout { grid-template-columns:1fr; }
  .sidebar { display:flex; overflow-x:auto; padding-bottom:8px; position:relative; top:auto; }
  .sidebar button, .sidebar a { flex:0 0 auto; white-space:nowrap; }
}
@media (max-width: 620px) {
  .site-header { min-height:66px; padding-inline:12px; }
  .brand span { display:none; }
  .language-button { min-width:62px; padding-inline:8px; }
  .page { padding-inline:14px; }
  .hero { padding-top:24px; }
  .hero-pro h1 { font-size:48px; }
  .hero-actions { flex-direction:column; align-items:stretch; }
  .hero-actions button, .hero-actions a { width:100%; }
  .compact-stats, .grid-3, .grid-4, .grid-2 { grid-template-columns:1fr !important; }
  .asset-strip { grid-template-columns:1fr; }
  .auth-layout { padding:18px 14px; }
  .auth-card-pro { padding:20px; border-radius:26px; }
  .auth-side-panel { display:none; }
  .auth-brand-block img { width:50px; height:50px; }
  .pro-phone { grid-template-columns:1fr; }
  .exchange-row { grid-template-columns:1fr; }
  .kyc-upload-grid { grid-template-columns:1fr; }
  .payment-head { flex-direction:column; }
  .modal-backdrop { padding:8px; align-items:flex-start; }
  .modal-card { border-radius:24px; width:100%; margin-top:8px; }
  .support-widget { right:10px; left:10px; width:auto; bottom:82px; }
  .support-fab { right:12px; bottom:12px; }
  .support-fab strong { display:none; }
  .floating-panel { right:10px; left:10px; width:auto; }
  .order-card { display:grid; gap:10px; text-align:left; }
  .table-wrap { overflow-x:visible; }
  .table-wrap table, .table-wrap thead, .table-wrap tbody, .table-wrap tr, .table-wrap td { display:block; width:100%; min-width:0; }
  .table-wrap thead { display:none; }
  .table-wrap tr { border:1px solid var(--line); border-radius:20px; padding:12px; margin:12px 0; background:rgba(255,255,255,.04); }
  .table-wrap td { border:0; padding:8px 0; }
}

/* ExchangeWales v3.1 corrective layer */
html, body, #app-shell { min-height: 100%; background-color: var(--bg); overscroll-behavior-y: none; }
body { overflow-x: hidden; }
#app { min-height: calc(100vh - 76px); }
[data-theme="light"] html, [data-theme="light"] body, [data-theme="light"] #app-shell { background-color: #eef4fb; }

.brand-mark { object-fit: contain; background: transparent; box-shadow: 0 12px 32px rgba(14,165,233,.22); }
.hero-pro p { max-width: 760px; }
.premium-badge { max-width: max-content; }
.asset-grid-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.asset-chip-card { min-height: 92px; padding: 14px; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 10px; }
.asset-chip-card small { grid-column: 1 / -1; font-size: 12px; line-height: 1.35; color: var(--muted); white-space: normal; }
.coin-orb { font-size: 12px; font-weight: 900; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: white; background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.36), transparent 28%), var(--coin); box-shadow: inset 0 0 0 1px rgba(255,255,255,.24), 0 12px 28px color-mix(in oklab, var(--coin) 45%, transparent); }

.rate-card { min-height: 142px; }
.rate-source { color: var(--warning); font-size: 13px; }
.rate-card[data-rate-card="USDT"], .rate-card[data-rate-card="USDC"] { min-height: 120px; }
.chart-panel { display: none; }

.mobile-menu { padding: 18px; }
.mobile-menu a { border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; margin: 7px 0; background: rgba(255,255,255,.035); }
.mobile-menu a[href="/login"], .mobile-menu a[href="/register"] { color: white; font-weight: 800; text-align: center; justify-content: center; background: linear-gradient(135deg, rgba(124,92,255,.72), rgba(14,165,233,.72)); }

.language-menu, .mobile-menu, .notification-panel, .profile-panel { box-shadow: 0 24px 80px rgba(0,0,0,.42); }
.language-menu button { min-height: 52px; }

.dashboard-layout { align-items: start; }
.sidebar { gap: 10px; }
.sidebar button, .sidebar a { min-height: 48px; }
.dashboard-card, .admin-card, .panel, .exchange-card, .auth-card { border-radius: 28px; }
.alert-card { border-color: rgba(245,158,11,.42); background: linear-gradient(180deg, rgba(245,158,11,.12), rgba(15,23,42,.72)); }

.order-list { display: grid; gap: 12px; }
.order-card { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 14px; text-align: left; }
.order-card strong { overflow-wrap: anywhere; }
.order-card .status-badge { justify-self: end; max-width: 150px; text-align: center; }
.status-badge { border-radius: 999px; padding: 9px 14px; line-height: 1.1; font-size: 12px; font-weight: 900; }
.status-badge.warning { background: rgba(245,158,11,.14); color: #ffd27a; border-color: rgba(245,158,11,.32); }

.phone-combo.pro-phone { display: grid; grid-template-columns: minmax(150px, .55fr) 1fr; gap: 10px; }
.password-wrap { grid-template-columns: minmax(0,1fr) auto auto; align-items: center; }
.password-wrap .mini-button { min-width: 64px; height: 46px; padding: 0 12px; }
.terms-line.compact { display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 14px; padding: 16px; border-radius: 20px; }
.terms-line.compact input { width: 26px; height: 26px; }
.error-line { display: block; color: #ff8f9d; min-height: 20px; font-size: 13px; margin-top: 6px; }
.input-wrap.is-valid { border-color: rgba(34,197,94,.55); box-shadow: 0 0 0 3px rgba(34,197,94,.08); }

.kyc-card input[type="date"] { width: 100%; min-width: 0; }
.kyc-upload-grid { display: grid; gap: 12px; }
.upload-tile { position: relative; min-height: 138px; padding: 18px; border-radius: 24px; border: 1px dashed rgba(124,92,255,.55); background: linear-gradient(180deg, rgba(124,92,255,.12), rgba(14,165,233,.08)); overflow: hidden; }
.upload-tile::before { content:""; width: 74%; height: 58%; border: 2px solid rgba(255,255,255,.34); border-radius: 14px; position: absolute; top: 20px; left: 13%; opacity: .42; pointer-events: none; }
.upload-tile strong, .upload-tile span, .upload-tile em { position: relative; z-index: 1; }
.upload-tile span { display:block; color: var(--muted); font-weight: 600; font-size: 13px; margin-top: 6px; }
.upload-tile em { display:block; margin-top: 10px; color: var(--accent-3); font-style: normal; font-size: 12px; overflow-wrap: anywhere; }
.upload-tile input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-tile.has-file { border-color: rgba(34,197,94,.55); }

.support-fab { z-index: 45; }
.support-fab button { width: 68px; height: 68px; border-radius: 50%; padding: 0; }
.support-fab strong { display: none; }
.support-widget { z-index: 80; max-height: min(620px, calc(100vh - 120px)); }
.support-messages { gap: 10px; }
.chat-bubble small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.support-attachment-preview { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(124,92,255,.14); border: 1px solid rgba(124,92,255,.24); color: var(--text); }
.support-attachment-preview button { min-height: 34px; padding: 0 10px; }
.support-thread { display: grid; gap: 8px; margin: 12px 0; }
.support-thread-line { padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); display: grid; gap: 6px; }
.support-thread-line.admin { background: rgba(14,165,233,.10); }
.support-ticket-card textarea { min-height: 92px; }

.modal-card { width: min(760px, calc(100vw - 28px)); }
.payment-screen { gap: 18px; }
.copy-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.copy-line input { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

@media (min-width: 981px) {
  .asset-grid-compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chart-panel { display: block; }
}

@media (max-width: 760px) {
  .site-header { min-height: 72px; padding: 0 16px; }
  .brand span { display: none; }
  .header-actions { gap: 8px; }
  .language-button { min-width: 86px; }
  .page { padding-left: 14px; padding-right: 14px; }
  .hero h1 { font-size: clamp(44px, 13vw, 64px); line-height: .96; }
  .hero-pro p { font-size: 20px; line-height: 1.45; }
  .asset-grid-compact { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .asset-chip-card { min-height: 104px; grid-template-columns: 38px 1fr; padding: 12px; }
  .coin-orb { width: 36px; height: 36px; border-radius: 12px; font-size: 10px; }
  .dashboard-layout, .admin-layout { display: block !important; }
  .sidebar { display: grid !important; grid-template-columns: repeat(2, minmax(0,1fr)); overflow: visible !important; padding-bottom: 0 !important; margin-bottom: 16px; }
  .sidebar > *, .admin-tabs > * { white-space: normal !important; flex: initial !important; }
  .sidebar a, .sidebar button { width: 100%; text-align: center; justify-content: center; }
  .dashboard-top, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .order-card { grid-template-columns: 1fr; }
  .order-card .status-badge { justify-self: start; max-width: none; }
  .phone-combo.pro-phone { grid-template-columns: 130px 1fr !important; }
  .password-wrap { grid-template-columns: 1fr; }
  .password-wrap .mini-button { width: 100%; }
  .support-widget { left: 10px; right: 10px; bottom: 94px; width: auto; }
  .support-fab { right: 16px; bottom: 92px; }
  .support-fab button { width: 58px; height: 58px; }
  .support-fab span { width: 28px; height: 28px; }
  .modal-card { padding: 18px; border-radius: 22px; max-height: calc(100dvh - 36px); }
  .payment-head { grid-template-columns: 1fr; }
}
.email-verify-inline { display:grid; grid-template-columns: minmax(0,1fr) auto auto; gap:10px; margin-top:14px; }
.email-verify-inline input { min-width:0; min-height:48px; }
@media (max-width: 760px) { .email-verify-inline { grid-template-columns:1fr; } }

/* v3.2 precision fixes: mobile polish, centered support, code modals, UID, RTL */
html, body { overscroll-behavior-y: none; background-color: var(--bg); }
body.is-rtl { direction: rtl; }
body.is-rtl input, body.is-rtl textarea, body.is-rtl select { direction: ltr; text-align: left; }
body.is-rtl .language-menu, body.is-rtl .floating-panel, body.is-rtl .support-widget, body.is-rtl .modal-card { direction: rtl; text-align: right; }
.brand-mark { object-fit: contain; background: transparent; box-shadow: 0 10px 28px rgba(14,165,233,.22); }
.modal-clean-head { align-items: flex-start; gap: 16px; }
.modal-logo { width: 58px; height: 58px; object-fit: contain; margin-bottom: 14px; filter: drop-shadow(0 8px 24px rgba(14,165,233,.22)); }
.code-form { gap: 14px; }
.code-input { text-align: center !important; letter-spacing: .55em; font-weight: 900; font-size: clamp(28px, 8vw, 48px); min-height: 82px; padding-left: .55em; }
.client-uid-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; margin: 16px 0 20px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.045); }
.client-uid-row span { color: var(--muted); font-size: 13px; }
.client-uid-row strong { font-size: 14px; overflow-wrap: anywhere; }
.support-fab { z-index: 44; }
.support-fab button { display: grid !important; place-items: center !important; width: 62px !important; height: 62px !important; padding: 0 !important; border-radius: 50% !important; }
.support-fab button > span { display: grid !important; place-items: center !important; width: 32px !important; height: 32px !important; font-size: 20px; font-weight: 900; line-height: 1; margin: 0; transform: translateY(0); }
.support-widget form { grid-template-columns: 1fr 48px; gap: 10px; }
.support-widget form button[type="submit"] { grid-column: 1 / -1; width: 100%; min-height: 48px; border-radius: 16px; font-weight: 800; }
.support-widget form input { min-height: 48px; }
.support-file { min-height: 48px !important; width: 48px !important; }
.support-messages { scroll-behavior: smooth; }
.chat-bubble { max-width: 82%; overflow-wrap: anywhere; }
.chat-bubble:not(.admin) { margin-left: auto; background: rgba(14,165,233,.16); }
.chat-bubble.admin { margin-right: auto; }
.rate-card [data-rate-change] { min-width: 52px; text-align: right; }
.asset-grid-compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
.asset-chip-card { min-height: 84px !important; }
.asset-chip-card .coin-orb { width: 40px; height: 40px; font-size: 11px; }
.upload-tile { cursor: pointer; }
.upload-tile.has-file::after { content: "✓"; position:absolute; right:14px; top:14px; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:white; background:#16a34a; font-weight:900; }
.toast { border-radius: 18px; border: 1px solid rgba(148,163,184,.22); box-shadow: 0 18px 50px rgba(0,0,0,.35); }
.modal-backdrop { overscroll-behavior: contain; }
.copy-line { grid-template-columns: minmax(0,1fr) auto; }
.copy-line input { min-width: 0; }

@media (max-width: 680px) {
  .site-header { padding: 0 14px; min-height: 74px; }
  .brand span { display:none; }
  .header-actions { gap: 8px; }
  .language-button { min-width: 78px; padding: 0 10px; }
  .mobile-menu { left: 12px; right: 12px; width: auto; }
  .support-fab { right: 18px !important; bottom: calc(92px + env(safe-area-inset-bottom)) !important; }
  .support-widget { bottom: calc(166px + env(safe-area-inset-bottom)) !important; max-height: calc(100dvh - 230px) !important; }
  .client-uid-row { grid-template-columns: 1fr; }
  .code-input { letter-spacing: .35em; padding-left: .35em; }
  .asset-grid-compact { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .asset-chip-card small { font-size: 11px; }
  .dashboard-card, .admin-card, .exchange-card, .panel { border-radius: 24px; }
  .sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* v3.3 critical stability and UI fixes */
.logo-img, .brand-mark, .auth-brand-block img, .modal-logo { aspect-ratio: 1 / 1; object-fit: contain; }
.support-fab button { display:flex !important; align-items:center !important; justify-content:center !important; }
.support-fab button > span { position:static !important; inset:auto !important; transform:none !important; line-height:1 !important; text-align:center !important; }
.support-widget form button[type="submit"] { min-height:54px; font-size:18px; }
.support-attachment-preview { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; margin-bottom:10px; border:1px solid var(--line); border-radius:16px; background:rgba(34,197,94,.09); color:var(--text); }
.support-attachment-preview button { min-height:34px; padding:0 12px; border-radius:12px; }
.password-wrap { grid-template-columns:minmax(0,1fr) auto auto !important; }
.password-wrap .mini-button { width:auto !important; min-width:74px; }
.email-verify-inline .soft-button, .email-verify-inline .ghost-button { white-space:nowrap; }
.modal-card .code-input { width:100%; box-sizing:border-box; }
.mobile-menu, .language-menu, .floating-panel { box-shadow:0 26px 80px rgba(0,0,0,.42); }
.toast { z-index:200; }
body { overflow-x:hidden; }

@media (max-width: 680px) {
  .password-wrap { grid-template-columns:minmax(0,1fr) !important; }
  .password-wrap .mini-button { width:100% !important; }
  .support-fab { pointer-events:auto; }
  .support-fab button { width:60px !important; height:60px !important; }
  .support-fab button > span { width:30px !important; height:30px !important; }
  .code-form .primary-button, .code-form .soft-button, .code-form .ghost-button { width:100%; }
  .modal-clean-head { display:grid; grid-template-columns:1fr auto; }
  .modal-clean-head .modal-logo { width:52px; height:52px; }
}


/* v3.6 hard fixes: logo clarity, support bubble, modal fit, no fake rates */
.brand-mark, .logo-img, .modal-logo, .auth-brand-block img { image-rendering:auto; transform:none !important; }
.support-fab { z-index:58 !important; right:18px !important; bottom:calc(110px + env(safe-area-inset-bottom)) !important; }
.support-fab button { display:flex !important; align-items:center !important; justify-content:center !important; width:62px !important; height:62px !important; padding:0 !important; border-radius:50% !important; }
.support-fab button > span { display:flex !important; align-items:center !important; justify-content:center !important; width:32px !important; height:32px !important; margin:0 !important; line-height:1 !important; transform:none !important; font-size:22px !important; font-weight:900 !important; }
.support-widget form { grid-template-columns:1fr 52px !important; gap:10px !important; }
.support-widget form button[type="submit"] { grid-column:1 / -1 !important; width:100% !important; min-height:54px !important; border-radius:18px !important; font-size:18px !important; }
.support-file { width:52px !important; min-height:52px !important; display:grid !important; place-items:center !important; }
.modal-backdrop { align-items:center !important; padding:14px !important; }
.modal-card { max-height:calc(100dvh - 34px) !important; overflow:auto !important; overscroll-behavior:contain !important; }
.modal-card .code-input { width:100% !important; letter-spacing:.45em !important; text-align:center !important; font-size:clamp(32px, 9vw, 52px) !important; }
.rate-card .muted-rate { color:#f59e0b !important; font-weight:800; }
.rate-price:has(+ .rate-line) { word-break:break-word; }
html, body { overscroll-behavior-y:none; background:var(--bg); }
@media (max-width: 640px) {
  .support-fab { right:16px !important; bottom:calc(120px + env(safe-area-inset-bottom)) !important; }
  .support-widget { left:10px !important; right:10px !important; bottom:calc(194px + env(safe-area-inset-bottom)) !important; max-height:calc(100dvh - 250px) !important; }
  .modal-card { width:calc(100vw - 24px) !important; padding:18px !important; border-radius:24px !important; }
  .modal-clean-head { display:grid !important; grid-template-columns:1fr auto !important; gap:12px !important; }
  .modal-clean-head .modal-logo { width:52px !important; height:52px !important; }
}

/* v4.1 hard UI stability layer: chat, fixed support button, assets, logo sizing, mobile layout */
html, body { min-width: 0; overflow-x: hidden !important; }
.site-header { z-index: 90; }
.brand-mark, .logo-img, .modal-logo, .auth-brand-block img { display:block; object-fit: contain !important; transform: none !important; }
.brand-mark { width:44px !important; height:44px !important; flex:0 0 44px; }
.modal-logo, .auth-brand-block img { width:56px !important; height:56px !important; }

.asset-strip.asset-grid-compact { display:grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap:14px !important; }
.asset-chip-card { grid-template-columns:52px minmax(0,1fr) !important; grid-template-areas:"orb main" !important; min-height:98px !important; gap:10px 14px !important; align-items:center !important; overflow:hidden !important; }
.asset-chip-card > div:not(.coin-orb) { min-width:0 !important; grid-area:main !important; }
.asset-chip-card strong, .asset-chip-card span, .asset-chip-card small { max-width:100% !important; }
.asset-chip-card span { white-space:normal !important; line-height:1.2 !important; overflow:visible !important; }
.asset-chip-card small { grid-area:main !important; grid-column:2 !important; display:block !important; margin-top:5px !important; white-space:normal !important; line-height:1.25 !important; overflow:visible !important; text-overflow:clip !important; word-break:normal !important; }
.asset-chip-card .coin-orb, .coin-orb { flex:0 0 auto !important; width:46px !important; height:46px !important; font-size:11px !important; }

.support-fab { position:fixed !important; right:18px !important; bottom:calc(86px + env(safe-area-inset-bottom)) !important; z-index:110 !important; transform:none !important; }
.support-fab button { position:relative !important; width:62px !important; height:62px !important; min-height:62px !important; padding:0 !important; border-radius:999px !important; display:grid !important; place-items:center !important; }
.support-fab button > span { width:34px !important; height:34px !important; display:grid !important; place-items:center !important; margin:0 !important; line-height:1 !important; font-size:23px !important; font-weight:900 !important; }
.support-fab strong { display:none !important; }
.support-unread { position:absolute; top:-7px; right:-5px; min-width:22px; height:22px; padding:0 6px; display:grid; place-items:center; border-radius:999px; background:#fb4d62; color:#fff; font-size:12px; font-style:normal; font-weight:900; box-shadow:0 8px 22px rgba(251,77,98,.38); }
.support-unread[hidden] { display:none !important; }
body.support-open .support-fab { display:none !important; }

.support-widget { right:18px !important; bottom:calc(158px + env(safe-area-inset-bottom)) !important; width:min(430px, calc(100vw - 36px)) !important; max-height:min(680px, calc(100dvh - 180px)) !important; z-index:120 !important; border-radius:24px !important; display:none; grid-template-rows:auto minmax(0, 1fr) auto; }
.support-widget.is-open { display:grid !important; }
.support-widget header { padding:18px 20px !important; align-items:center !important; }
.support-widget header strong { font-size:20px !important; }
.support-widget header button { min-height:42px; padding:0 14px; border:1px solid var(--line) !important; border-radius:14px !important; background:rgba(255,255,255,.04) !important; color:var(--muted-strong) !important; }
.support-messages { height:auto !important; min-height:300px !important; max-height:none !important; overflow:auto !important; display:flex !important; flex-direction:column !important; gap:12px !important; padding:18px !important; }
.chat-bubble { display:block !important; width:max-content !important; min-width:56px !important; max-width:min(76%, 540px) !important; padding:13px 16px !important; border-radius:18px !important; line-height:1.35 !important; white-space:pre-wrap !important; overflow-wrap:break-word !important; word-break:normal !important; }
.chat-bubble:not(.admin) { align-self:flex-end !important; margin-left:0 !important; margin-right:0 !important; background:rgba(14,165,233,.20) !important; }
.chat-bubble.admin { align-self:flex-start !important; margin-left:0 !important; margin-right:0 !important; background:rgba(124,92,255,.22) !important; }
.support-widget form { display:grid !important; grid-template-columns:minmax(0,1fr) 56px !important; gap:10px !important; padding:14px 18px 18px !important; }
.support-widget form input { min-width:0 !important; min-height:56px !important; border-radius:18px !important; }
.support-file { width:56px !important; min-height:56px !important; border-radius:18px !important; }
.support-widget form button[type="submit"] { grid-column:1 / -1 !important; width:100% !important; min-height:58px !important; border-radius:20px !important; font-size:18px !important; font-weight:900 !important; }
.support-attachment-preview { grid-column:1 / -1; }

.rate-card [data-rate-change] { text-align:right !important; min-width:0 !important; max-width:55%; overflow-wrap:anywhere; }
.rate-card .muted-rate { color:#f59e0b !important; font-weight:900 !important; }
.rate-top { gap:12px !important; }

.upload-tile { overflow:hidden !important; display:flex !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; gap:8px !important; padding:18px !important; }
.upload-tile::before { width:68% !important; height:48% !important; left:16% !important; top:24px !important; }
.upload-tile strong, .upload-tile span, .upload-tile em { position:relative !important; z-index:2 !important; max-width:92% !important; text-align:center !important; line-height:1.25 !important; }
.upload-tile span { overflow-wrap:normal !important; word-break:normal !important; }

@media (min-width: 980px) {
  .auth-layout { display:grid !important; place-items:center !important; }
  .v3-auth { width:min(1120px, calc(100vw - 64px)) !important; }
  .dashboard-layout, .admin-layout { grid-template-columns:240px minmax(0,1fr) !important; gap:24px !important; }
  .sidebar, .admin-tabs { position:sticky; top:96px; align-self:start; }
}

@media (max-width: 760px) {
  .site-header { min-height:76px !important; padding:0 16px !important; }
  .header-actions { gap:8px !important; }
  .brand-mark { width:42px !important; height:42px !important; }
  .language-button { min-width:78px !important; }
  .asset-strip.asset-grid-compact { grid-template-columns: repeat(2, minmax(0,1fr)) !important; gap:12px !important; }
  .asset-chip-card { min-height:112px !important; padding:14px 12px !important; grid-template-columns:46px minmax(0,1fr) !important; }
  .asset-chip-card strong { font-size:18px !important; }
  .asset-chip-card small { font-size:12px !important; }
  .support-widget.is-open { inset:0 !important; width:100vw !important; height:100dvh !important; max-height:none !important; border-radius:0 !important; border-left:0 !important; border-right:0 !important; grid-template-rows:auto minmax(0,1fr) auto !important; }
  .support-messages { min-height:0 !important; padding:18px 16px !important; }
  .chat-bubble { max-width:82% !important; font-size:16px !important; }
  .support-widget form { padding:12px 16px calc(18px + env(safe-area-inset-bottom)) !important; }
  .support-fab { right:18px !important; bottom:calc(92px + env(safe-area-inset-bottom)) !important; }
  .dashboard-layout, .admin-layout { display:block !important; }
  .sidebar, .admin-tabs { display:grid !important; grid-template-columns:repeat(2, minmax(0,1fr)) !important; gap:10px !important; overflow:visible !important; }
  .sidebar a, .sidebar button, .admin-tabs button { min-height:54px !important; text-align:center !important; white-space:normal !important; justify-content:center !important; }
}


/* v4.3 hard stabilization: compact mobile, fixed header width, fixed support, clean assets */
html, body, #app-shell { width:100%; max-width:100%; overflow-x:hidden; }
body { -webkit-text-size-adjust:100%; }
#app { min-height: calc(100dvh - 78px); }
.site-header { width:100%; max-width:100vw; gap:12px; padding-inline:clamp(12px,3vw,28px) !important; overflow:hidden; }
.brand { flex:0 1 auto; min-width:0; }
.brand span { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.header-actions { flex:0 0 auto; min-width:0; max-width:calc(100vw - 92px); gap:8px !important; }
.header-actions > * { flex:0 0 auto; }
.language-button { min-width:74px; padding-inline:14px !important; }
#activeLanguageFlag { display:none !important; }
.notification-button, .avatar-button, .menu-button, .icon-button { min-width:42px; width:42px; height:42px; border-radius:14px !important; }
.notification-button strong { top:-8px !important; right:-6px !important; min-width:22px; height:22px; display:grid; place-items:center; font-size:12px; }
.mobile-menu, .floating-panel { max-width:calc(100vw - 24px) !important; }

.page { width:min(var(--container), calc(100vw - 28px)); margin-inline:auto; padding-inline:0 !important; }
.section, .panel, .dashboard-card, .admin-card, .exchange-card, .auth-card { overflow:hidden; }
.hero-pro, .auth-layout, .dashboard-layout { max-width:100%; }

.asset-strip.asset-grid-compact { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:12px !important; }
.asset-chip-card { min-width:0 !important; min-height:96px; display:grid !important; grid-template-columns:58px minmax(0,1fr) !important; align-items:center !important; gap:14px !important; padding:16px !important; }
.asset-chip-card .coin-orb { grid-column:1; grid-row:1; width:54px !important; height:54px !important; font-size:16px !important; position:static !important; }
.asset-copy { grid-column:2; min-width:0; display:grid; gap:3px; }
.asset-copy strong, .asset-copy span, .asset-copy small { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; line-height:1.12; }
.asset-copy strong { font-size:20px; }
.asset-copy small { color:var(--muted); font-size:13px; }

.swap-divider { display:flex; justify-content:center; align-items:center; margin:2px 0 4px; }
.swap-divider button { width:46px !important; height:46px !important; min-height:46px !important; border-radius:50% !important; font-size:22px !important; font-weight:900 !important; line-height:1 !important; }

.dashboard-layout { display:grid; grid-template-columns:minmax(0,220px) minmax(0,1fr); gap:18px; align-items:start; }
.sidebar { position:sticky; top:90px; display:grid; grid-template-columns:1fr; gap:8px; padding:14px !important; border-radius:20px !important; }
.sidebar button, .sidebar a { min-height:42px !important; border-radius:14px !important; padding:10px 12px !important; text-align:left; font-size:14px !important; }
.dashboard-main { min-width:0; }
.grid-2, .grid-3, .grid-4, .exchange-row { min-width:0; }
.stat-card { min-width:0; }
.stat-card strong { overflow-wrap:anywhere; }

.support-fab { position:fixed !important; right:16px !important; bottom:calc(82px + env(safe-area-inset-bottom)) !important; transform:none !important; z-index:110 !important; }
.support-fab button { width:62px !important; height:62px !important; min-height:62px !important; padding:0 !important; border-radius:999px !important; display:grid !important; place-items:center !important; }
.support-fab button > span { display:grid !important; place-items:center !important; width:34px !important; height:34px !important; border-radius:50% !important; font-size:22px !important; font-weight:900 !important; line-height:1 !important; margin:0 !important; position:static !important; transform:none !important; }
.support-fab strong { display:none !important; }
.support-unread { position:absolute; top:-7px; right:-5px; min-width:22px; height:22px; border-radius:999px; display:grid; place-items:center; background:var(--danger); color:#fff; font-size:12px; font-style:normal; font-weight:900; }
body.support-open .support-fab { display:none !important; }
.support-widget { position:fixed !important; right:18px !important; bottom:calc(156px + env(safe-area-inset-bottom)) !important; width:min(430px, calc(100vw - 36px)) !important; height:min(650px, calc(100dvh - 178px)) !important; max-height:none !important; z-index:130 !important; grid-template-rows:auto minmax(0,1fr) auto !important; overflow:hidden !important; }
.support-widget.is-open { display:grid !important; }
.support-messages { min-height:0 !important; overflow-y:auto !important; padding:22px !important; }
.chat-bubble { max-width:min(82%, 540px) !important; width:auto !important; min-width:0 !important; overflow-wrap:anywhere !important; white-space:normal !important; line-height:1.35 !important; padding:13px 16px !important; border-radius:18px !important; }
.chat-bubble:not(.admin) { margin-left:auto !important; }
.support-widget form { display:grid !important; grid-template-columns:minmax(0,1fr) 52px !important; gap:10px !important; padding:14px 18px 18px !important; }
.support-widget form input { min-width:0 !important; }
.support-widget form button[type="submit"] { grid-column:1/-1 !important; width:100% !important; min-height:54px !important; border-radius:18px !important; font-weight:900 !important; }

.qr-box.pro-qr { padding:18px !important; align-items:center !important; justify-content:center !important; }
.qr-box.pro-qr img { width:min(340px, 78vw) !important; height:auto !important; aspect-ratio:1/1; border-radius:18px !important; image-rendering:pixelated; }
.payment-screen { align-items:start; }

.kyc-photo-guide { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; padding:14px 16px; border:1px solid rgba(124,92,255,.35); background:rgba(124,92,255,.10); border-radius:18px; color:var(--muted-strong); }
.kyc-photo-guide strong { color:var(--text); }
.upload-tile { position:relative; min-height:142px !important; display:grid !important; place-items:center !important; text-align:center; overflow:hidden; }
.upload-tile::before { content:""; position:absolute; inset:34px 42px; border:3px solid rgba(226,232,240,.28); border-radius:18px; pointer-events:none; }
.upload-tile::after { content:""; position:absolute; right:42px; top:34px; width:22px; height:22px; border-top:4px solid rgba(226,232,240,.48); border-right:4px solid rgba(226,232,240,.48); pointer-events:none; }
.upload-tile strong, .upload-tile span, .upload-tile em { position:relative; max-width:90%; overflow-wrap:anywhere; }
.upload-tile span { line-height:1.25; }

.modal-card { max-width:min(760px, calc(100vw - 24px)) !important; }
.modal-logo, .auth-brand-block img, .brand-mark { object-fit:contain !important; }

@media (max-width: 980px) {
  .desktop-nav, .header-actions > .auth-only-guest { display:none !important; }
  .brand span { display:none !important; }
  .dashboard-layout { display:block !important; }
  .sidebar { position:static !important; display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:8px !important; margin-bottom:16px !important; }
  .sidebar button, .sidebar a { text-align:center !important; font-size:14px !important; min-height:44px !important; }
}

@media (max-width: 760px) {
  :root { --radius:14px; --radius-lg:22px; }
  .site-header { min-height:68px !important; padding-inline:12px !important; }
  .brand-mark { width:40px !important; height:40px !important; border-radius:13px !important; }
  .header-actions { max-width:calc(100vw - 68px); gap:7px !important; }
  .language-button { min-width:68px !important; height:42px !important; font-size:16px !important; }
  .notification-button, .avatar-button, .menu-button, .icon-button { width:42px !important; min-width:42px !important; height:42px !important; }
  .page { width:calc(100vw - 28px) !important; padding-top:18px !important; }
  .hero h1, .section-heading h2, .auth-card h1 { font-size:clamp(34px, 10vw, 54px) !important; line-height:1.02 !important; }
  .dashboard-card h2, .admin-card h2, .panel h2 { font-size:clamp(26px, 8vw, 38px) !important; }
  .section { margin:26px 0 !important; }
  .panel, .dashboard-card, .admin-card, .exchange-card, .auth-card, .feature-card { border-radius:22px !important; padding:20px !important; }
  .asset-strip.asset-grid-compact { grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:10px !important; }
  .asset-chip-card { grid-template-columns:50px minmax(0,1fr) !important; min-height:96px !important; padding:13px !important; gap:10px !important; }
  .asset-chip-card .coin-orb { width:48px !important; height:48px !important; font-size:14px !important; }
  .asset-copy strong { font-size:18px !important; }
  .asset-copy span, .asset-copy small { font-size:12px !important; }
  .grid-2, .grid-3, .grid-4, .exchange-row { grid-template-columns:1fr !important; }
  .rate-card { min-height:122px !important; padding:18px !important; }
  .rate-price { font-size:clamp(28px, 8vw, 40px) !important; }
  .sidebar { grid-template-columns:repeat(2,minmax(0,1fr)) !important; padding:12px !important; }
  .sidebar button, .sidebar a { padding:10px 8px !important; font-size:13px !important; }
  .mobile-menu { left:12px !important; right:12px !important; top:76px !important; padding:14px !important; }
  .mobile-menu a { min-height:44px !important; padding:10px 14px !important; font-size:15px !important; }
  .floating-panel { left:12px !important; right:12px !important; top:76px !important; width:auto !important; }
  .support-widget.is-open { inset:0 !important; width:100vw !important; height:100dvh !important; max-height:none !important; border-radius:0 !important; border-left:0 !important; border-right:0 !important; }
  .support-widget header { padding:18px 20px !important; }
  .support-widget form { padding:12px 16px calc(18px + env(safe-area-inset-bottom)) !important; }
  .support-messages { padding:18px 16px !important; }
  .modal-card { width:calc(100vw - 20px) !important; padding:18px !important; border-radius:22px !important; }
}

@media (max-width: 420px) {
  .page { width:calc(100vw - 20px) !important; }
  .site-header { padding-inline:10px !important; }
  .header-actions { gap:6px !important; }
  .notification-button, .avatar-button, .menu-button, .icon-button { width:40px !important; min-width:40px !important; height:40px !important; }
  .language-button { min-width:64px !important; padding-inline:10px !important; }
  .asset-chip-card { grid-template-columns:46px minmax(0,1fr) !important; }
  .asset-chip-card .coin-orb { width:44px !important; height:44px !important; }
}


/* v4.3.1 targeted mobile/admin stabilization */
.site-header { z-index: 240 !important; }
.language-switcher, .header-actions { position: relative; }
.language-menu { z-index: 260 !important; top: calc(100% + 8px) !important; }
.mobile-menu { z-index: 235 !important; top: calc(100% + 8px) !important; padding: 14px !important; gap: 8px; overflow-y: auto; max-height: calc(100dvh - 92px); }
.floating-panel { z-index: 250 !important; }
.notification-panel, .profile-panel { top: 84px !important; }
.mobile-menu-section { display: grid; gap: 8px; padding: 8px 0 2px; }
.mobile-menu-section strong { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 4px 6px; }
.mobile-menu button, .mobile-menu-signout { width: 100%; border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; background: rgba(255,255,255,.035); color: var(--text); text-align: left; }
.mobile-menu button:hover { background: rgba(124,92,255,.12); }
.mobile-menu-signout { background: linear-gradient(135deg, rgba(251,77,98,.92), rgba(225,29,72,.92)); color: #fff; font-weight: 800; text-align: center !important; }
.profile-panel .activity-list { gap: 8px; }
.profile-panel .soft-button, .profile-panel .danger-button { width: 100%; justify-content: flex-start; }
.support-fab { position: fixed !important; right: 14px !important; bottom: max(14px, calc(env(safe-area-inset-bottom) + 14px)) !important; z-index: 260 !important; }
.support-fab button { width: 58px !important; height: 58px !important; min-height: 58px !important; box-shadow: 0 18px 42px rgba(14,165,233,.26) !important; }
.support-widget { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
.user-admin-card, .support-ticket-card, .admin-mobile-card { min-width: 0 !important; overflow: hidden; }
.user-admin-card > div:first-child, .support-ticket-card > div:first-child { display: grid !important; grid-template-columns: 1fr !important; justify-content: initial !important; min-width: 0; }
.user-admin-card span, .support-ticket-card span, .user-admin-card strong, .support-ticket-card strong { overflow-wrap: anywhere; }
.user-admin-card .status-badge, .support-ticket-card .status-badge { width: fit-content; }
.user-admin-card .status-badge { margin-top: 10px; }
@media (max-width: 980px) {
  .dashboard-layout { grid-template-columns: 1fr !important; }
  .dashboard-layout > .sidebar { display: none !important; }
  .dashboard-main { min-width: 0 !important; }
  .grid-4, .grid-3, .grid-2, .dashboard-top { grid-template-columns: 1fr !important; }
  .table-wrap { overflow-x: auto !important; }
  .site-header { padding-inline: 12px !important; gap: 10px !important; }
  .header-actions { gap: 6px !important; max-width: calc(100vw - 74px) !important; }
}
@media (max-width: 760px) {
  .brand-mark { width: 42px !important; height: 42px !important; flex: 0 0 42px; }
  .menu-button, .icon-button, .notification-button, .avatar-button { width: 40px !important; height: 40px !important; min-width: 40px !important; }
  .language-button { min-width: 64px !important; padding-inline: 10px !important; }
  .page { width: calc(100vw - 24px) !important; }
  .hero-pro h1, .hero h1 { font-size: clamp(32px, 12vw, 54px) !important; line-height: .98 !important; }
  .dashboard-card, .admin-card, .panel, .exchange-card, .auth-card, .stat-card { border-radius: 22px !important; padding: 16px !important; }
  .asset-copy strong { font-size: 18px !important; }
  .asset-copy small { font-size: 12px !important; }
}

/* v4.3.2 emergency dropdown/install/mobile stabilization */
.site-header {
  overflow: visible !important;
  z-index: 300 !important;
}
.header-actions,
.language-switcher {
  position: relative !important;
  overflow: visible !important;
}
.language-menu {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 1200 !important;
  width: min(260px, calc(100vw - 24px)) !important;
  max-height: min(420px, calc(100dvh - 92px)) !important;
  overflow-y: auto !important;
  background: var(--panel-solid) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55) !important;
}
.language-menu.is-open { display: grid !important; }
.mobile-menu {
  position: fixed !important;
  top: 78px !important;
  left: 12px !important;
  right: 12px !important;
  width: auto !important;
  z-index: 1150 !important;
  max-height: calc(100dvh - 92px) !important;
  overflow-y: auto !important;
  background: var(--panel-solid) !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55) !important;
}
.mobile-menu.is-open { display: grid !important; }
.floating-panel {
  z-index: 1160 !important;
  background: var(--panel-solid) !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55) !important;
}
.profile-panel,
.notification-panel {
  position: fixed !important;
  top: 78px !important;
  right: 12px !important;
  left: auto !important;
  width: min(420px, calc(100vw - 24px)) !important;
}
.support-fab {
  position: fixed !important;
  right: 16px !important;
  bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  z-index: 900 !important;
  transform: none !important;
}
.support-fab button {
  width: 60px !important;
  height: 60px !important;
  min-height: 60px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  border-radius: 999px !important;
}
.support-fab button > span {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  line-height: 1 !important;
}
.support-widget.is-open { z-index: 1300 !important; }
.brand-mark,
.modal-logo,
.auth-brand-block img,
.footer .brand img {
  object-fit: contain !important;
}
.asset-chip-card {
  min-width: 0 !important;
  overflow: hidden !important;
}
.asset-copy,
.asset-copy strong,
.asset-copy span,
.asset-copy small {
  min-width: 0 !important;
}
.asset-copy strong,
.asset-copy span,
.asset-copy small {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 980px) {
  .dashboard-layout > .sidebar,
  .dashboard-layout .sidebar {
    display: none !important;
  }
  .admin-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 68px !important;
    padding-inline: 14px !important;
    overflow: visible !important;
  }
  .header-actions {
    overflow: visible !important;
    max-width: calc(100vw - 74px) !important;
  }
  .language-menu {
    right: -52px !important;
    top: calc(100% + 10px) !important;
  }
  .mobile-menu {
    top: 70px !important;
    left: 10px !important;
    right: 10px !important;
    padding: 12px !important;
  }
  .mobile-menu a,
  .mobile-menu button,
  .mobile-menu-signout {
    min-height: 42px !important;
    padding: 10px 14px !important;
    font-size: 15px !important;
    border-radius: 14px !important;
  }
  .profile-panel,
  .notification-panel {
    top: 70px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: calc(100dvh - 86px) !important;
  }
  .support-fab {
    right: 14px !important;
    bottom: calc(94px + env(safe-area-inset-bottom)) !important;
  }
  .support-fab button {
    width: 58px !important;
    height: 58px !important;
    min-height: 58px !important;
  }
  .asset-strip.asset-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  .asset-chip-card {
    grid-template-columns: 50px minmax(0, 1fr) !important;
    gap: 10px !important;
    min-height: 92px !important;
    padding: 12px !important;
  }
  .asset-chip-card .coin-orb {
    width: 48px !important;
    height: 48px !important;
    font-size: 14px !important;
  }
  .asset-copy strong { font-size: 18px !important; line-height: 1.05 !important; }
  .asset-copy span, .asset-copy small { font-size: 12px !important; line-height: 1.15 !important; }
}


/* v4.3.3 hard fix: Firestore-safe installer package + visible mobile dropdowns */
html, body, #app-shell, #app { max-width: 100vw !important; overflow-x: hidden !important; }
.site-header { overflow: visible !important; isolation: isolate; }
.header-actions, .language-switcher { overflow: visible !important; }
.language-menu {
  position: fixed !important;
  top: 76px !important;
  right: 12px !important;
  left: auto !important;
  width: min(320px, calc(100vw - 24px)) !important;
  max-height: calc(100dvh - 96px) !important;
  overflow-y: auto !important;
  z-index: 5000 !important;
  display: none !important;
  background: #111827 !important;
  border: 1px solid rgba(148,163,184,.28) !important;
  border-radius: 18px !important;
  padding: 10px !important;
  box-shadow: 0 30px 110px rgba(0,0,0,.65) !important;
}
.language-menu.is-open { display: grid !important; gap: 6px !important; }
.language-menu button { min-height: 48px !important; border-radius: 14px !important; padding: 10px 12px !important; }
.mobile-menu {
  position: fixed !important;
  top: 76px !important;
  left: 12px !important;
  right: 12px !important;
  width: auto !important;
  max-height: calc(100dvh - 96px) !important;
  overflow-y: auto !important;
  z-index: 4900 !important;
  display: none !important;
  background: #111827 !important;
  border: 1px solid rgba(148,163,184,.28) !important;
  border-radius: 20px !important;
  box-shadow: 0 30px 110px rgba(0,0,0,.65) !important;
}
.mobile-menu.is-open { display: grid !important; }
.floating-panel { z-index: 4950 !important; }
.support-fab { position: fixed !important; right: 16px !important; bottom: calc(90px + env(safe-area-inset-bottom)) !important; z-index: 3000 !important; transform: none !important; }
.support-widget.is-open { z-index: 5200 !important; }
.asset-chip-card, .rate-card, .admin-mobile-card, .user-admin-card, .support-ticket-card, .dashboard-card, .admin-card, .exchange-card, .panel { max-width: 100% !important; min-width: 0 !important; }
.asset-copy, .asset-copy * { min-width: 0 !important; max-width: 100% !important; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }
.user-admin-card > div:first-child, .support-ticket-card > div:first-child { min-width: 0 !important; max-width: 100% !important; }
.user-admin-card span, .user-admin-card strong, .support-ticket-card span, .support-ticket-card strong { overflow-wrap: anywhere !important; word-break: break-word !important; }
.user-admin-card .status-badge, .support-ticket-card .status-badge { width: fit-content !important; max-width: 100% !important; }
@media (max-width: 980px), (hover: none) and (pointer: coarse) {
  .dashboard-layout > .sidebar, .dashboard-layout .sidebar, .admin-layout > .admin-tabs, .admin-layout .admin-tabs { display: none !important; }
  .dashboard-layout, .admin-layout { display: block !important; }
  .page { width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important; }
}
@media (max-width: 760px) {
  .language-menu, .mobile-menu { top: 70px !important; }
  .site-header { overflow: visible !important; }
  .support-fab { right: 14px !important; bottom: calc(88px + env(safe-area-inset-bottom)) !important; }
}

/* v4.3.4 hard fixes: fixed support, compact menu, KYC upload tiles, asset cards */
.site-header { overflow: visible !important; }
.language-menu.is-open, .mobile-menu.is-open, .floating-panel.is-open { display: grid !important; }
.mobile-menu { overscroll-behavior: contain; }
.mobile-menu a, .mobile-menu button, .mobile-menu-signout {
  min-height: 42px !important;
  padding: 10px 14px !important;
  border-radius: 14px !important;
  font-size: 15px !important;
}
.mobile-menu-section { gap: 6px !important; padding-top: 8px !important; }
.mobile-menu-section strong { padding: 2px 4px !important; }

.support-fab {
  position: fixed !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  z-index: 1600 !important;
  transform: none !important;
}
.support-fab button {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  display: grid !important;
  place-items: center !important;
}
.support-fab button > span {
  position: static !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
  font-size: 20px !important;
}
.support-widget {
  position: fixed !important;
  right: 14px !important;
  bottom: 78px !important;
  width: min(420px, calc(100vw - 28px)) !important;
  height: min(640px, calc(100dvh - 96px)) !important;
  z-index: 1590 !important;
  transform: none !important;
}
@media (max-width: 760px) {
  .support-widget.is-open {
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
  }
  .support-widget form { padding-bottom: max(14px, env(safe-area-inset-bottom)) !important; }
}

.asset-chip-card {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 92px !important;
  padding: 14px !important;
}
.asset-chip-card .coin-orb {
  position: static !important;
  flex: 0 0 48px !important;
  width: 48px !important;
  height: 48px !important;
}
.asset-copy {
  display: flex !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
}
.asset-copy strong, .asset-copy span, .asset-copy small {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.12 !important;
  max-width: 100% !important;
}
.asset-copy small {
  overflow-wrap: anywhere !important;
  font-size: 12px !important;
}

.kyc-photo-guide {
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  padding: 12px 14px !important;
  line-height: 1.3 !important;
}
.kyc-upload-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
}
.upload-tile {
  min-height: 124px !important;
  padding: 14px 16px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}
.upload-tile::before { display: none !important; }
.upload-tile::after {
  content: "" !important;
  position: absolute !important;
  right: 18px !important;
  top: 18px !important;
  width: 18px !important;
  height: 18px !important;
  border-top: 3px solid rgba(226,232,240,.45) !important;
  border-right: 3px solid rgba(226,232,240,.45) !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.upload-tile.has-file::after {
  content: "✓" !important;
  right: 14px !important;
  top: 14px !important;
  width: 30px !important;
  height: 30px !important;
  border: 0 !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  color: #fff !important;
  background: #16a34a !important;
  font-weight: 900 !important;
}
.upload-tile strong, .upload-tile span, .upload-tile em {
  max-width: calc(100% - 44px) !important;
  text-align: center !important;
  line-height: 1.25 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  z-index: 2 !important;
}
.upload-tile em { color: #22c55e !important; font-weight: 800 !important; }

.success-modal-body {
  display: grid;
  gap: 18px;
  place-items: center;
  text-align: center;
}
.success-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34,197,94,.14);
  border: 1px solid rgba(34,197,94,.42);
  color: #86efac;
  font-size: 44px;
  font-weight: 900;
}
.success-modal-body p { max-width: 520px; color: var(--muted-strong); }

@media (max-width: 760px) {
  .panel, .dashboard-card, .admin-card, .exchange-card, .auth-card, .stat-card { padding: 16px !important; }
  .dashboard-card h2, .admin-card h2, .panel h2 { font-size: clamp(25px, 8vw, 34px) !important; }
  .dashboard-card h3, .admin-card h3, .panel h3 { font-size: clamp(22px, 6.2vw, 28px) !important; }
  .sidebar { display: none !important; }
}

/* v4.3.5 targeted UI/legal polish: compact menus, stable chat, readable legal pages, refined toasts */
html { font-size: 15px; }
body { font-size: 15px; }

.hero-pro h1, .hero h1 {
  font-size: clamp(42px, 7vw, 72px) !important;
  line-height: .98 !important;
  letter-spacing: -0.055em !important;
}
.hero-pro p { font-size: clamp(16px, 2.2vw, 20px) !important; line-height: 1.48 !important; }
.hero-actions { gap: 10px !important; }
.section { margin: 42px 0 !important; }
.panel, .dashboard-card, .admin-card, .exchange-card, .auth-card, .feature-card { padding: clamp(18px, 2.4vw, 28px) !important; }

.mobile-menu {
  padding: 10px !important;
  gap: 6px !important;
  align-content: start !important;
}
.mobile-menu a,
.mobile-menu button,
.mobile-menu-signout {
  margin: 0 !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
  line-height: 1.15 !important;
}
.mobile-menu-section { display: none !important; }

.language-menu {
  top: 72px !important;
  z-index: 7000 !important;
}
.language-menu button { min-height: 42px !important; padding: 9px 10px !important; font-size: 14px !important; }

.notification-button { overflow: visible !important; }
.notification-button .bell-icon {
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  font-size: 0 !important;
  line-height: 1 !important;
  color: var(--text) !important;
  background: none !important;
}
.notification-button .bell-icon::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 0 0-5-6.71V3a2 2 0 0 0-4 0v1.29A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.5 2.5 0 0 0 2.45-2h-4.9A2.5 2.5 0 0 0 12 22Zm7-6V11a7 7 0 0 0-5-6.71V3a2 2 0 0 0-4 0v1.29A7 7 0 0 0 5 11v5l-2 2v1h18v-1l-2-2Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.notification-button strong { pointer-events: none !important; }

.support-fab {
  position: fixed !important;
  right: max(16px, env(safe-area-inset-right)) !important;
  bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  z-index: 5500 !important;
  transform: none !important;
}
.support-fab button {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  box-shadow: 0 18px 48px rgba(14, 165, 233, .34), 0 0 0 1px rgba(255,255,255,.12) inset !important;
}
.support-widget { z-index: 7600 !important; }
.support-widget form,
.support-widget form * { pointer-events: auto !important; }
.support-widget form input {
  min-height: 50px !important;
  font-size: 15px !important;
}
.support-widget form button[type="submit"] {
  min-height: 50px !important;
  font-size: 16px !important;
}
.support-messages { overscroll-behavior: contain !important; }

.toast-stack {
  top: calc(84px + env(safe-area-inset-top)) !important;
  right: 16px !important;
  width: min(420px, calc(100vw - 32px)) !important;
  z-index: 9000 !important;
}
.toast {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: start !important;
  padding: 13px 14px !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  background: rgba(17, 24, 39, .96) !important;
  border: 1px solid rgba(148, 163, 184, .24) !important;
  backdrop-filter: blur(16px) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.42) !important;
  animation: toastIn .18s ease-out both;
}
.toast span:last-child { line-height: 1.32 !important; overflow-wrap: anywhere !important; }
.toast-icon {
  width: 28px !important;
  height: 28px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  font-weight: 900 !important;
  color: #fff !important;
  background: #22c55e !important;
}
.toast-error .toast-icon { background: #fb4d62 !important; }
.toast.is-hiding { opacity: 0; transform: translateY(-6px); transition: .22s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.legal-page { max-width: 980px !important; }
.legal-panel { font-size: 14px !important; line-height: 1.62 !important; }
.legal-panel h1 { font-size: clamp(30px, 5vw, 48px) !important; margin: 10px 0 12px !important; }
.legal-panel .auth-lead { font-size: 15px !important; line-height: 1.55 !important; margin-bottom: 22px !important; }
.legal-section { padding: 18px 0 !important; border-top: 1px solid var(--line); }
.legal-section h2 { font-size: clamp(18px, 2.5vw, 24px) !important; margin: 0 0 8px !important; letter-spacing: -.02em !important; }
.legal-section p { margin: 0 !important; color: var(--muted-strong) !important; }
.faq-card h3 { margin-top: 0 !important; }
.faq-card p { color: var(--muted-strong) !important; line-height: 1.5 !important; }

.dashboard-card .eyebrow + h2,
.dashboard-card .eyebrow + h3,
.admin-card .eyebrow + h2,
.admin-card .eyebrow + h3,
.panel .eyebrow + h1,
.panel .eyebrow + h2,
.panel .eyebrow + h3 { margin-top: 12px !important; }

.verified-state-card { display: grid !important; gap: 18px !important; }
.verified-state-head { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 14px; align-items: start; }
.verified-check { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: linear-gradient(135deg, #22c55e, #0ea5e9); font-size: 30px; font-weight: 900; box-shadow: 0 16px 40px rgba(34,197,94,.22); }
.verified-state-head h2 { margin: 8px 0 8px !important; }
.verified-state-head p { color: var(--muted-strong); margin: 0; }

.kyc-card .pro-form { gap: 14px !important; }
.kyc-photo-guide { display: block !important; font-size: 14px !important; }
.kyc-photo-guide strong { display: block !important; margin-bottom: 6px !important; }
.upload-tile {
  min-height: 112px !important;
  border: 1px dashed rgba(124,92,255,.42) !important;
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(14,165,233,.08)) !important;
}
.upload-tile::before { display: none !important; }
.upload-tile::after { display: none !important; }
.upload-tile.has-file {
  border-color: rgba(34,197,94,.56) !important;
  background: linear-gradient(135deg, rgba(34,197,94,.12), rgba(14,165,233,.08)) !important;
}
.upload-tile.has-file::after { display: grid !important; }
.upload-tile strong { font-size: 17px !important; }
.upload-tile span { font-size: 13px !important; line-height: 1.25 !important; }
.upload-tile em { margin-top: 3px !important; font-size: 12px !important; }

.footer { font-size: 14px !important; }
.footer a, .footer p { font-size: 13px !important; }

@media (max-width: 760px) {
  html { font-size: 14px; }
  body { font-size: 14px; }
  .site-header { min-height: 66px !important; }
  .brand-mark { width: 38px !important; height: 38px !important; border-radius: 12px !important; }
  .language-button { min-width: 60px !important; height: 40px !important; font-size: 15px !important; padding-inline: 10px !important; }
  .notification-button, .avatar-button, .menu-button, .icon-button { width: 40px !important; min-width: 40px !important; height: 40px !important; }
  .page { width: calc(100vw - 22px) !important; padding-top: 16px !important; }
  .hero-pro h1, .hero h1 { font-size: clamp(34px, 10.5vw, 50px) !important; line-height: 1.02 !important; }
  .hero-pro p { font-size: 16px !important; }
  .section-heading h2 { font-size: clamp(26px, 7.2vw, 34px) !important; }
  .dashboard-card h2, .admin-card h2, .panel h2 { font-size: clamp(24px, 7vw, 32px) !important; }
  .dashboard-card h3, .admin-card h3, .panel h3 { font-size: clamp(20px, 5.8vw, 26px) !important; }
  .panel, .dashboard-card, .admin-card, .exchange-card, .auth-card, .feature-card, .stat-card { padding: 16px !important; border-radius: 20px !important; }
  .hero-stats.compact-stats { gap: 10px !important; }
  .stat-card strong { font-size: clamp(26px, 8vw, 38px) !important; }
  .support-fab { right: 16px !important; bottom: calc(78px + env(safe-area-inset-bottom)) !important; }
  .support-widget.is-open { inset: 0 !important; width: 100vw !important; height: 100dvh !important; }
  .toast-stack { top: calc(72px + env(safe-area-inset-top)) !important; right: 10px !important; width: calc(100vw - 20px) !important; }
  .legal-panel { font-size: 13.5px !important; }
  .legal-section { padding: 15px 0 !important; }
  .asset-strip.asset-grid-compact { gap: 9px !important; }
  .asset-chip-card { min-height: 88px !important; padding: 11px !important; gap: 8px !important; }
  .asset-chip-card .coin-orb { width: 42px !important; height: 42px !important; font-size: 12px !important; }
  .asset-copy strong { font-size: 16px !important; }
  .asset-copy span, .asset-copy small { font-size: 11px !important; }
}


/* v4.3.6 surgical recovery: admin tools visible again, fixed support button, light/dark contrast cleanup */
#app:empty::before {
  content: "Loading ExchangeWales...";
  display: block;
  width: min(720px, calc(100vw - 28px));
  margin: 22px auto;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  color: var(--muted-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.first-paint-panel {
  min-height: 180px;
  display: grid;
  align-content: center;
  gap: 10px;
}
.first-paint-panel h2 { margin: 0 !important; font-size: clamp(24px, 5vw, 36px) !important; }
.first-paint-panel p { margin: 0 !important; color: var(--muted-strong) !important; }

/* The user dashboard menu stays in the profile popover, but the admin page must keep its own management tabs. */
.admin-page .admin-dashboard-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
}
.admin-page .admin-sidebar,
.admin-page .dashboard-layout > .sidebar,
.admin-page .dashboard-layout .sidebar {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 8px !important;
  position: sticky !important;
  top: 88px !important;
  margin: 0 !important;
  padding: 12px !important;
  overflow: visible !important;
  background: var(--panel) !important;
  border: 1px solid var(--line) !important;
  border-radius: 20px !important;
}
.admin-page .admin-sidebar button,
.admin-page .admin-sidebar a,
.admin-page .dashboard-layout > .sidebar button,
.admin-page .dashboard-layout > .sidebar a {
  width: 100% !important;
  min-height: 40px !important;
  padding: 9px 10px !important;
  border-radius: 12px !important;
  font-size: 13.5px !important;
  line-height: 1.15 !important;
  text-align: left !important;
  justify-content: flex-start !important;
  white-space: normal !important;
}
.admin-page .dashboard-main { min-width: 0 !important; }

/* Hard-fix the support button to the bottom-right of the visible page instead of drifting through cards. */
.support-fab {
  position: fixed !important;
  right: calc(14px + env(safe-area-inset-right)) !important;
  bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  left: auto !important;
  top: auto !important;
  z-index: 9000 !important;
  transform: none !important;
  pointer-events: auto !important;
}
.support-fab button {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
}
.support-fab button > span {
  position: static !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  margin: 0 !important;
  line-height: 1 !important;
  transform: none !important;
}
body.support-open .support-fab { display: none !important; }

/* Keep notification icon visible in both themes without changing notification logic. */
.notification-button { display: inline-grid !important; place-items: center !important; overflow: visible !important; }
.notification-button .bell-icon { color: var(--text) !important; opacity: .96 !important; }
.notification-button strong {
  top: -8px !important;
  right: -8px !important;
  border: 2px solid var(--panel-solid) !important;
  box-shadow: 0 10px 24px rgba(251,77,98,.25) !important;
}

/* Light theme contrast cleanup for email gate and dashboard cards. */
[data-theme="light"] body {
  background: radial-gradient(circle at 14% 8%, rgba(124,92,255,.14), transparent 26rem), radial-gradient(circle at 86% 12%, rgba(14,165,233,.12), transparent 26rem), linear-gradient(180deg, #eef4fb, #f8fbff) !important;
}
[data-theme="light"] .panel,
[data-theme="light"] .dashboard-card,
[data-theme="light"] .admin-card,
[data-theme="light"] .exchange-card,
[data-theme="light"] .auth-card,
[data-theme="light"] .stat-card,
[data-theme="light"] .floating-panel,
[data-theme="light"] .mobile-menu,
[data-theme="light"] .support-widget {
  background: rgba(255,255,255,.88) !important;
  color: #101827 !important;
  border-color: rgba(71,85,105,.16) !important;
  box-shadow: 0 20px 58px rgba(42,58,95,.14) !important;
}
[data-theme="light"] .alert-card {
  background: linear-gradient(180deg, rgba(255,248,235,.96), rgba(255,255,255,.92)) !important;
  border-color: rgba(245,158,11,.36) !important;
  color: #101827 !important;
}
[data-theme="light"] .alert-card p,
[data-theme="light"] .dashboard-card p,
[data-theme="light"] .admin-card p,
[data-theme="light"] .panel p,
[data-theme="light"] .rate-line {
  color: #35445d !important;
}
[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: rgba(255,255,255,.96) !important;
  color: #101827 !important;
  border-color: rgba(71,85,105,.18) !important;
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: rgba(53,68,93,.56) !important; }
[data-theme="light"] .notification-button .bell-icon { color: #101827 !important; }
[data-theme="light"] .support-fab button { box-shadow: 0 18px 48px rgba(14,165,233,.24), 0 0 0 1px rgba(15,23,42,.08) inset !important; }
[data-theme="light"] .toast { background: rgba(255,255,255,.96) !important; color: #101827 !important; border-color: rgba(71,85,105,.16) !important; }

@media (max-width: 980px) {
  .admin-page .admin-dashboard-layout {
    display: block !important;
  }
  .admin-page .admin-sidebar,
  .admin-page .dashboard-layout > .sidebar,
  .admin-page .dashboard-layout .sidebar {
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 14px !important;
    padding: 10px !important;
    max-height: none !important;
  }
  .admin-page .admin-sidebar button,
  .admin-page .admin-sidebar a,
  .admin-page .dashboard-layout > .sidebar button,
  .admin-page .dashboard-layout > .sidebar a {
    min-height: 38px !important;
    padding: 8px 8px !important;
    text-align: center !important;
    justify-content: center !important;
    font-size: 12.8px !important;
  }
}

@media (max-width: 760px) {
  .support-fab {
    right: calc(12px + env(safe-area-inset-right)) !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;
  }
  .support-fab button { width: 54px !important; height: 54px !important; min-height: 54px !important; }
  .support-widget.is-open {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    max-height: none !important;
    border-radius: 0 !important;
    z-index: 9200 !important;
  }
  .admin-page .admin-sidebar,
  .admin-page .dashboard-layout > .sidebar,
  .admin-page .dashboard-layout .sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .admin-page .admin-sidebar button,
  .admin-page .admin-sidebar a {
    font-size: 12.5px !important;
    min-height: 38px !important;
  }
}

/* v4.3.7 targeted fixes: mobile input zoom, compact menus, fixed support FAB, saved wallets, AML notifications */
@media (max-width: 760px) {
  input, select, textarea, button { font-size: 16px !important; }
  input, select, textarea { min-height: 44px !important; }
}

/* keep floating help button fixed to viewport bottom-right, above mobile browser bar */
.support-fab {
  position: fixed !important;
  right: max(14px, env(safe-area-inset-right)) !important;
  bottom: max(14px, env(safe-area-inset-bottom)) !important;
  left: auto !important;
  top: auto !important;
  transform: translate3d(0,0,0) !important;
  z-index: 2147483000 !important;
  pointer-events: auto !important;
  contain: layout style paint !important;
}
.support-fab button {
  width: 56px !important;
  height: 56px !important;
  min-height: 56px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}
.support-widget.is-open { z-index: 2147483100 !important; }

/* tighter, cleaner mobile menu */
.mobile-menu {
  gap: 4px !important;
  padding: 10px !important;
  align-content: start !important;
}
.mobile-menu a,
.mobile-menu button,
.mobile-menu-signout {
  margin: 0 !important;
  min-height: 38px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  line-height: 1.15 !important;
}
.mobile-menu-section { margin: 0 !important; padding: 0 !important; gap: 4px !important; }

/* refined header controls */
.notification-button .bell-icon { display: grid !important; place-items: center !important; }
.notification-button strong { z-index: 3 !important; }
.language-button #activeLanguageFlag { display: none !important; }
.language-button { gap: 0 !important; }

/* saved wallets cards */
.saved-wallets-card .wallet-list-item {
  display: grid !important;
  grid-template-columns: minmax(0,1fr) auto !important;
  gap: 12px !important;
  align-items: start !important;
}
.wallet-full-address {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: break-word !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
  font-size: 12.5px !important;
}
.wallet-card-actions {
  display: flex !important;
  gap: 6px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}
.wallet-card-actions button { min-height: 34px !important; padding: 7px 10px !important; font-size: 13px !important; }
@media (max-width: 760px) {
  .saved-wallets-card .wallet-list-item { grid-template-columns: 1fr !important; }
  .wallet-card-actions { justify-content: stretch !important; }
  .wallet-card-actions button { flex: 1 1 auto !important; }
}

/* AML notification paragraphs must remain readable */
.notification-message-text {
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  line-height: 1.42 !important;
}
.retest-button { border-color: rgba(245,158,11,.38) !important; color: #facc15 !important; }

/* less aggressive hero typography on phones */
.hero-pro h1, .hero h1 {
  letter-spacing: -0.035em !important;
}
@media (max-width: 760px) {
  .hero-pro h1, .hero h1 { font-size: clamp(32px, 9.4vw, 46px) !important; }
  .hero-pro p { font-size: 15.5px !important; }
  .section { margin: 32px 0 !important; }
}

/* support input stays clickable and visually stable */
.support-widget form { pointer-events: auto !important; }
.support-widget input, .support-widget button, .support-widget label { pointer-events: auto !important; }

/* email verification code in modals */
.code-input { letter-spacing: .18em !important; padding-left: .18em !important; font-size: clamp(24px, 7vw, 38px) !important; }

/* v4.3.8 KYC camera overlay + desktop wheel scroll fix */
@media (hover: hover) and (pointer: fine) {
  html, body, #app-shell {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overscroll-behavior-y: auto !important;
  }
  #app { min-height: calc(100vh - 76px) !important; }
}

.kyc-capture-tile {
  min-height: 168px !important;
  display: grid !important;
  place-items: center !important;
  gap: 6px !important;
  text-align: center !important;
  isolation: isolate;
}
.kyc-capture-tile::before { display: none !important; }
.kyc-tile-preview {
  position: relative;
  width: min(152px, 70%) !important;
  height: 82px !important;
  display: block !important;
  border: 2px solid rgba(238, 244, 255, .45);
  border-radius: 16px;
  opacity: .68;
}
.kyc-tile-preview span {
  position: absolute;
  left: 18px;
  top: 20px;
  width: 28px;
  height: 28px;
  border: 2px solid rgba(238, 244, 255, .82);
  border-radius: 50%;
}
.kyc-tile-preview span::after {
  content: "";
  position: absolute;
  left: -8px;
  bottom: -18px;
  width: 44px;
  height: 18px;
  border: 2px solid rgba(238, 244, 255, .82);
  border-top: 0;
  border-radius: 0 0 24px 24px;
}
.kyc-tile-preview i,
.kyc-tile-preview b {
  position: absolute;
  left: 62px;
  right: 18px;
  height: 3px;
  border-radius: 999px;
  background: rgba(238, 244, 255, .82);
}
.kyc-tile-preview i { top: 28px; }
.kyc-tile-preview b { top: 46px; right: 34px; }
.kyc-camera-note {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(124, 92, 255, .28);
  background: rgba(124, 92, 255, .12);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.1;
}
[data-theme="light"] .kyc-tile-preview { border-color: rgba(30, 41, 59, .28); }
[data-theme="light"] .kyc-tile-preview span,
[data-theme="light"] .kyc-tile-preview span::after { border-color: rgba(30, 41, 59, .55); }
[data-theme="light"] .kyc-tile-preview i,
[data-theme="light"] .kyc-tile-preview b { background: rgba(30, 41, 59, .55); }

.kyc-camera-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: grid;
  place-items: center;
  padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  background: #000;
  color: #fff;
  overflow: hidden;
}
.kyc-camera-shell {
  width: min(720px, 100vw);
  height: min(920px, 100dvh);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  background: #000;
}
.kyc-camera-topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 6px;
}
.kyc-camera-topbar div {
  display: grid;
  gap: 2px;
  text-align: center;
  min-width: 0;
}
.kyc-camera-topbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}
.kyc-camera-topbar span {
  color: rgba(255,255,255,.56);
  font-size: 12px;
}
.kyc-camera-icon,
.kyc-camera-upload,
.kyc-camera-secondary {
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  background: rgba(255,255,255,.10);
  border-radius: 999px;
}
.kyc-camera-icon {
  width: 44px;
  height: 44px;
  font-size: 36px;
  line-height: 1;
}
.kyc-camera-upload,
.kyc-camera-secondary {
  min-height: 40px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 700;
}
.kyc-camera-stage {
  position: relative;
  min-height: 0;
  border-radius: 28px;
  overflow: hidden;
  background: #050505;
}
.kyc-camera-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111;
}
.kyc-camera-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: clamp(16px, 4vw, 34px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.50), rgba(0,0,0,.08) 34%, rgba(0,0,0,.38));
}
.kyc-camera-instruction {
  justify-self: center;
  max-width: 520px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(30, 30, 30, .82);
  color: #fff;
  font-size: clamp(15px, 3.5vw, 19px);
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0,0,0,.24);
}
.kyc-frame-wrap {
  display: grid;
  place-items: center;
  min-height: 0;
}
.kyc-frame {
  position: relative;
  width: min(100%, 540px);
  aspect-ratio: 1.585 / 1;
  border: 3px solid rgba(255,255,255,.95);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 9999px rgba(0,0,0,.14), 0 18px 60px rgba(0,0,0,.36);
}
.kyc-camera-passport .kyc-frame { width: min(94%, 420px); aspect-ratio: .72 / 1; }
.kyc-camera-selfie .kyc-frame { width: min(86%, 420px); aspect-ratio: .82 / 1; border-radius: 50% 50% 44% 44%; }
.kyc-frame .corner {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-color: #fff;
  border-style: solid;
  pointer-events: none;
}
.kyc-frame .corner.tl { top: 16px; left: 16px; border-width: 4px 0 0 4px; border-radius: 10px 0 0 0; }
.kyc-frame .corner.tr { top: 16px; right: 16px; border-width: 4px 4px 0 0; border-radius: 0 10px 0 0; }
.kyc-frame .corner.bl { bottom: 74px; left: 16px; border-width: 0 0 4px 4px; border-radius: 0 0 0 10px; }
.kyc-frame .corner.br { bottom: 74px; right: 16px; border-width: 0 4px 4px 0; border-radius: 0 0 10px 0; }
.kyc-camera-selfie .kyc-frame .corner { display: none; }
.kyc-frame-hint {
  position: absolute;
  z-index: 4;
  left: 12%;
  right: 12%;
  top: 42%;
  transform: translateY(-50%);
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(30,30,30,.70);
  color: #fff;
  text-align: center;
  font-size: clamp(14px, 3vw, 17px);
  line-height: 1.28;
}
.kyc-frame-label {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(255,255,255,.92);
  color: #111827;
  font-size: clamp(15px, 3.4vw, 18px);
}
.kyc-frame-label-icon {
  position: relative;
  width: 42px;
  height: 30px;
  flex: 0 0 auto;
  border: 3px solid #6d28d9;
  border-radius: 4px;
}
.kyc-frame-label-icon::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #6d28d9;
}
.kyc-frame-label-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  right: 5px;
  top: 8px;
  height: 3px;
  border-radius: 999px;
  background: #6d28d9;
  box-shadow: 0 8px 0 #6d28d9;
}
.kyc-guide {
  position: absolute;
  inset: 16% 12% 25% 12%;
  z-index: 2;
  opacity: .54;
}
.kyc-guide .face,
.kyc-guide-selfie span {
  position: absolute;
  left: 12%;
  top: 12%;
  width: 30%;
  height: 58%;
  border: 5px solid rgba(255,255,255,.78);
  border-radius: 46% 46% 40% 40%;
}
.kyc-guide-selfie span { left: 30%; top: 8%; width: 40%; height: 72%; border-radius: 50% 50% 42% 42%; }
.kyc-guide .face::after,
.kyc-guide-selfie span::after {
  content: "";
  position: absolute;
  left: -16%;
  right: -16%;
  bottom: -30%;
  height: 30%;
  border: 5px solid rgba(255,255,255,.78);
  border-top: 0;
  border-radius: 0 0 999px 999px;
}
.kyc-guide .line {
  position: absolute;
  left: 52%;
  right: 8%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}
.kyc-guide .l1 { top: 22%; }
.kyc-guide .l2 { top: 40%; right: 18%; }
.kyc-guide .l3 { top: 62%; right: 32%; }
.kyc-guide .mrz {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 2%;
  height: 28px;
  opacity: .82;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.78) 0 10px, transparent 10px 18px);
}
.kyc-guide-back .line { left: 8%; right: 8%; }
.kyc-guide-back .l2 { right: 16%; }
.kyc-guide-back .l3 { right: 26%; }
.kyc-guide-passport .face { left: 10%; top: 6%; width: 34%; height: 52%; }
.kyc-guide-passport .line { left: 54%; right: 8%; }
.kyc-guide-passport .mrz { bottom: 5%; height: 42px; }
.kyc-capture-tips {
  justify-self: center;
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.94);
  font-weight: 700;
  font-size: 15px;
  pointer-events: none;
}
.kyc-camera-actions {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 4px 8px 10px;
}
.kyc-capture-button {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  border: 5px solid #fff;
  background: #fff;
  box-shadow: inset 0 0 0 6px #000, 0 14px 44px rgba(0,0,0,.28);
}
.kyc-camera-secondary:first-child { justify-self: start; }
.kyc-camera-secondary:last-child { justify-self: end; }
@media (max-width: 760px) {
  .kyc-camera-backdrop { padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
  .kyc-camera-shell { width: 100vw; height: 100dvh; padding: 12px; gap: 10px; }
  .kyc-camera-stage { border-radius: 22px; }
  .kyc-camera-topbar { padding: 0 2px; }
  .kyc-camera-upload { max-width: 112px; padding: 0 10px; font-size: 12px; }
  .kyc-camera-overlay { padding: 18px 16px; }
  .kyc-frame { width: min(100%, 560px); }
  .kyc-camera-actions { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}
