/* ==========================================================================
   IndoLinessa Market — interface styles
   Satu aksen, permukaan solid, garis rambut, tipografi tenang.
   ========================================================================== */

@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrainsmono-latin.woff2') format('woff2');
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0a0b;
  --bg-2: #0c0c0e;
  --panel: #121214;
  --panel-2: #17171a;
  --panel-3: #1d1d21;
  --input: #0d0d10;

  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.145);

  --text: #f4f4f5;
  --muted: #a2a2a8;
  --muted-2: #70707a;

  --accent: #e9b44c;
  --accent-hover: #f2c468;
  --accent-ink: #171104;
  --accent-dim: rgba(233, 180, 76, 0.11);
  --accent-line: rgba(233, 180, 76, 0.30);

  --green: #3ed598;
  --green-dim: rgba(62, 213, 152, 0.11);
  --red: #ff6e6e;
  --red-dim: rgba(255, 110, 110, 0.10);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.9);
  --shadow-soft: 0 8px 24px -18px rgba(0, 0, 0, 0.85);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 0.18s;

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI',
    Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;

  --nav-h: 64px;
  --container: 1240px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img,
svg {
  max-width: 100%;
}

img {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

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

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.14;
}

h1 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.03;
  letter-spacing: -0.036em;
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.1;
}

h3 {
  font-size: 15px;
  letter-spacing: -0.012em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

::selection {
  background: var(--accent);
  color: var(--accent-ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- utilities ---------------- */

.container {
  width: min(var(--container), calc(100% - 48px));
  margin-inline: auto;
}

main {
  min-height: 60vh;
}

.page {
  padding: 40px 0 80px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-head .sub,
.sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13.5px;
  max-width: 620px;
}

.section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 10px 0 12px;
}

.section-head p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.row {
  display: flex;
  align-items: center;
}

.wrap {
  flex-wrap: wrap;
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted {
  color: var(--muted);
}

.dim {
  color: var(--muted-2);
}

.up {
  color: var(--green) !important;
}

.down {
  color: var(--red) !important;
}

.gold {
  color: var(--accent);
}

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

.cyan {
  color: var(--muted);
}

.violet {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.big {
  font-size: 30px;
}

.br {
  border-radius: 50%;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 16px 0;
}

.hide {
  display: none !important;
}

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

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

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

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 14px;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mt {
  margin-top: 16px;
}

.code-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86em;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.grad-text {
  color: var(--accent);
}

.lead {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.muted a,
p a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(233, 180, 76, 0.4);
  text-underline-offset: 3px;
}

.muted a:hover,
p a:hover {
  text-decoration-color: var(--accent);
}

/* ---------------- nav ---------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 11, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}

.nav-inner {
  width: min(var(--container), calc(100% - 40px));
  height: var(--nav-h);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img {
  border-radius: 9px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text b {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-text em {
  font-style: normal;
  color: var(--accent);
}

.brand-text small {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-links a {
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.nav-links a.active {
  color: var(--text);
  background: var(--panel-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.nav-balance span {
  color: var(--muted-2);
  font-family: var(--font);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 9px;
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease);
}

.nav-user:hover {
  border-color: var(--line-strong);
}

.nav-name {
  font-size: 12.5px;
  font-weight: 500;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.icon-btn.sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 14px;
}

.dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px var(--bg);
}

.nav-login-link {
  font-size: 13px;
  color: var(--muted);
  padding: 8px 4px;
}

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

.nav-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: transparent;
  padding: 10px 9px;
  flex-direction: column;
  justify-content: space-between;
}

.nav-burger span {
  display: block;
  height: 1.5px;
  background: var(--muted);
  border-radius: 2px;
}

.nav-mobile-only {
  display: none;
}

.nav-mobile-logout {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--red);
  text-align: left;
  padding: 13px 12px 6px;
  font-size: 12.5px;
  margin-top: 6px;
}

.nav-mobile-login {
  border-top: 1px solid var(--line);
  margin-top: 6px;
  padding: 13px 12px 6px !important;
  color: var(--accent) !important;
  font-weight: 600;
}

/* ---------------- ticker ---------------- */

.ticker {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  height: 36px;
}

.ticker::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg-2) 0, transparent 4%, transparent 96%, var(--bg-2) 100%);
  pointer-events: none;
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  width: max-content;
  animation: tickerScroll 72s linear infinite;
}

.ticker:hover .ticker-track {
  animation-play-state: paused;
}

.tick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
  font-size: 11.5px;
  white-space: nowrap;
  border-right: 1px solid var(--line);
}

.tick img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  border-radius: 50%;
}

.tick b {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tick span {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.tick .up,
.tick .down {
  font-size: 10.5px;
}

@keyframes tickerScroll {
  to {
    transform: translateX(-50%);
  }
}

/* ---------------- notifications ---------------- */

.notif-wrap {
  position: relative;
}

.notif-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: calc(100vw - 28px);
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 70;
  animation: popIn 0.16s var(--ease);
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.notif-item.unread {
  background: var(--accent-dim);
}

.ni-ico {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.ni-title {
  font-size: 12.3px;
  font-weight: 600;
}

.ni-body {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.5;
}

.ni-time {
  font-size: 10px;
  color: var(--muted-2);
  margin-top: 3px;
}

.notif-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}

.notif-foot a {
  color: var(--accent);
}

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  font-size: 11px;
  color: var(--accent);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------------- mobile nav ---------------- */

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 65;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 10, 11, 0.94);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.mobile-nav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 60px;
}

.mnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 500;
  color: var(--muted-2);
}

.mnav-item svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}

.mnav-item.active {
  color: var(--accent);
}

/* ---------------- footer ---------------- */

footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 48px 0 32px;
}

.foot {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 32px;
}

.foot-brand p {
  margin-top: 14px;
  color: var(--muted-2);
  font-size: 12.5px;
  line-height: 1.7;
  max-width: 300px;
}

.foot-col h4 {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-2);
  margin-bottom: 10px;
  font-weight: 600;
}

.foot-col a {
  display: block;
  padding: 4px 0;
  font-size: 12.5px;
  color: var(--muted);
}

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

.foot-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 11px;
}

/* ---------------- buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn:hover {
  background: var(--panel-3);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-green {
  background: var(--green);
  border-color: var(--green);
  color: #04120d;
  font-weight: 600;
}

.btn-green:hover {
  background: #55e2aa;
  border-color: #55e2aa;
}

.btn-red {
  background: var(--red);
  border-color: var(--red);
  color: #1c0505;
  font-weight: 600;
}

.btn-soft {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: var(--accent);
}

.btn-soft:hover {
  background: rgba(233, 180, 76, 0.17);
  border-color: rgba(233, 180, 76, 0.5);
}

.btn-danger-soft {
  background: var(--red-dim);
  border-color: rgba(255, 110, 110, 0.28);
  color: #ffb0b0;
}

.btn-danger-soft:hover {
  background: rgba(255, 110, 110, 0.18);
  border-color: rgba(255, 110, 110, 0.45);
}

.btn-sm {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.center-actions {
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

/* ---------------- badges / chips ---------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
}

.badge-ok {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(62, 213, 152, 0.24);
}

.badge-info {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: var(--accent-line);
}

.badge-warn {
  background: rgba(233, 180, 76, 0.09);
  color: #f0cd8a;
  border-color: rgba(233, 180, 76, 0.22);
}

.badge-bad {
  background: var(--red-dim);
  color: #ffabab;
  border-color: rgba(255, 110, 110, 0.26);
}

.badge-muted {
  background: var(--panel-2);
  color: var(--muted-2);
  border-color: var(--line);
}

.side-buy {
  color: var(--green);
  font-weight: 600;
}

.side-sell {
  color: var(--red);
  font-weight: 600;
}

.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.live-dot.off {
  background: var(--muted-2);
}

.pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------------- cards ---------------- */

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 22px;
}

.card-tight {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.card-head .dim {
  font-size: 11.5px;
}

.card-head > div:not(.toolbar) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-body {
  padding: 18px 20px;
}

.card-foot {
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}

.glass-panel {
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
}

.stat-label {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.stat-value {
  margin-top: 7px;
  font-family: var(--mono);
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.stat-value.small {
  font-size: 18px;
}

.stat-delta {
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.kpi {
  display: flex;
  flex-direction: column;
}

.kpi small {
  font-size: 11px;
  color: var(--muted);
}

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

.kpi-card {
  overflow: hidden;
  padding: 18px;
}

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

.kpi-ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.kpi-card.violet .kpi-ico,
.kpi-card.green .kpi-ico,
.kpi-card.cyan .kpi-ico,
.kpi-card.gold .kpi-ico {
  color: var(--accent);
}

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12.5px;
}

.empty .big {
  font-size: 26px;
  opacity: 0.35;
  margin-bottom: 10px;
}

.empty-ico {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 14px;
  border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.empty-inline {
  padding: 10px 16px 20px;
  text-align: center;
  color: var(--muted-2);
  font-size: 12px;
}

.loading {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--line-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  border-radius: 6px;
  background: var(--panel-2);
  animation: skeletonPulse 1.6s ease-in-out infinite;
}

@keyframes skeletonPulse {
  50% {
    background: var(--panel-3);
  }
}

.spark {
  width: 92px;
  height: 28px;
  display: block;
}

.coin-icon {
  border-radius: 50%;
  object-fit: contain;
  vertical-align: middle;
  flex-shrink: 0;
}

img[src*="/coins/XRP.svg"] {
  background: #eef2ff;
  padding: 2px;
  border-radius: 50%;
  box-sizing: border-box;
}

/* ---------------- tables ---------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.data th {
  padding: 11px 18px;
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

table.data tr:last-child td {
  border-bottom: 0;
}

table.data tbody tr {
  transition: background-color 0.14s var(--ease);
}

table.data tbody tr:hover {
  background: var(--panel-2);
}

table.data th.right,
table.data td.right {
  text-align: right;
}

table.data td.num {
  font-variant-numeric: tabular-nums;
}

table.data .row-me {
  background: var(--accent-dim);
}

table.data .row-me:hover {
  background: rgba(233, 180, 76, 0.16);
}

.asset-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.asset-cell .sym {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.asset-cell .nm {
  font-size: 10.5px;
  color: var(--muted-2);
}

.asset-cell:hover .sym {
  color: var(--accent);
}

.rank-cell {
  width: 52px;
}

/* ---------------- forms ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field:last-child {
  margin-bottom: 0;
}

.field.is-disabled {
  opacity: 0.5;
}

.field.is-disabled input {
  cursor: not-allowed;
}

.field label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.field-hint {
  font-size: 10.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

input[type='text'],
input[type='search'],
input[type='number'],
input[type='password'],
input[type='datetime-local'],
input[type='email'],
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--input);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(233, 180, 76, 0.13);
}

select {
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2370707a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

select option {
  background: var(--panel-2);
  color: var(--text);
}

.input-suffix {
  position: relative;
}

.input-suffix input {
  padding-right: 58px;
}

.input-suffix .suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  pointer-events: none;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}

.quick {
  display: flex;
  gap: 5px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.quick button {
  flex: 1;
  min-width: 52px;
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
}

.quick button:hover {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--accent);
}

.code-input {
  font-family: var(--mono);
  font-size: 17px;
  letter-spacing: 0.16em;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
}

.seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--input);
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.seg button {
  border: 0;
  background: none;
  color: var(--muted-2);
  padding: 7px 8px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 500;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.seg button.active {
  background: var(--panel-3);
  color: var(--text);
}

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

.switch-row input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch {
  position: relative;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--panel-3);
  border: 1px solid var(--line);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  margin-top: 1px;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.switch-row input:checked + .switch {
  background: var(--accent);
  border-color: var(--accent);
}

.switch-row input:checked + .switch::after {
  transform: translateX(16px);
  background: var(--accent-ink);
}

.switch-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.switch-row b {
  font-size: 12.5px;
  font-weight: 500;
}

.switch-row small {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.5;
}

/* ---------------- alerts ---------------- */

.alert {
  padding: 12px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
}

.alert-info {
  background: var(--accent-dim);
  border-color: var(--accent-line);
  color: #f0d6a5;
}

.alert-warn {
  background: rgba(233, 180, 76, 0.07);
  border-color: rgba(233, 180, 76, 0.24);
  color: #edd6a8;
}

.alert-bad {
  background: var(--red-dim);
  border-color: rgba(255, 110, 110, 0.26);
  color: #ffb3b3;
}

/* ---------------- tabs ---------------- */

.tabs-nav {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--input);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 16px;
}

.tabs-nav button {
  border: 0;
  background: none;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

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

.tabs-nav button.active {
  color: var(--text);
  background: var(--panel-3);
}

.tab-panel {
  animation: fadeIn 0.2s var(--ease);
}

/* ---------------- landing ---------------- */

.hero {
  position: relative;
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 56px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--muted);
}

.hero h1 {
  margin: 22px 0 18px;
}

.hero .lead {
  max-width: 48ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.hero-actions .btn {
  min-height: 44px;
  padding: 11px 20px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted-2);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 26px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-2);
}

.hero-chip b {
  color: var(--text);
  font-weight: 500;
  font-family: var(--mono);
}

.hero-visual {
  position: relative;
}

.market-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}

.market-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-price-block {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 18px;
}

.market-card-price {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  margin-top: 6px;
}

.market-card-price .price {
  font-family: var(--mono);
  font-size: clamp(26px, 3.2vw, 34px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.hero-mini-chart {
  opacity: 0.9;
}

.market-card-rows {
  display: flex;
  flex-direction: column;
}

.mc-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 11px;
  padding: 9px 8px;
  border-radius: 8px;
  transition: background-color 0.14s var(--ease);
}

.mc-row:hover {
  background: var(--panel-2);
}

.mc-row + .mc-row {
  border-top: 1px solid var(--line);
}

.mc-row .sym {
  font-size: 12px;
  font-weight: 600;
}

.mc-row .nm {
  font-size: 10.5px;
  color: var(--muted-2);
}

.mc-row .px {
  font-family: var(--mono);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.mc-row .ch {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  min-width: 58px;
  text-align: right;
}

.market-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted-2);
}

.market-card-foot a {
  color: var(--accent);
  font-weight: 500;
}

.market-card-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: 0;
}

.stats-strip > div {
  padding: 20px 22px;
}

.stats-strip > div + div {
  border-left: 1px solid var(--line);
}

.stats-strip .l {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  font-weight: 500;
}

.stats-strip .v {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.feature {
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.feature:hover {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.feature .ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  margin-bottom: 16px;
}

.feature .ico svg {
  stroke: var(--muted) !important;
}

.feature h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.feature p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--line);
  overflow: hidden;
}

.trust-item {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: var(--panel);
}

.t-ico {
  flex-shrink: 0;
  color: var(--muted);
}

.t-ico svg {
  stroke: var(--muted) !important;
}

.trust-item div:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trust-item b {
  font-size: 12.5px;
  font-weight: 500;
}

.trust-item span {
  font-size: 11.5px;
  color: var(--muted-2);
  line-height: 1.5;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  counter-increment: step;
}

.step::before {
  content: '0' counter(step);
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  margin-bottom: 14px;
}

.step h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

.step p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  padding: 36px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.cta-panel h2 {
  margin: 10px 0 8px;
  font-size: clamp(22px, 2.4vw, 30px);
}

.cta-panel p {
  color: var(--muted);
  font-size: 13.5px;
  max-width: 540px;
}

.cta-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* ---------------- auth ---------------- */

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--nav-h));
  padding: 48px 20px 64px;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  width: min(960px, 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  overflow: hidden;
}

.auth-aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 40px;
  background: var(--panel-2);
  border-right: 1px solid var(--line);
}

.auth-aside h2 {
  margin-top: 34px;
  font-size: clamp(24px, 2.8vw, 30px);
  line-height: 1.12;
}

.auth-aside p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  max-width: 340px;
}

.auth-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-point {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-point .tick {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(62, 213, 152, 0.3);
  background: transparent;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 10px;
}

.auth-mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
  margin-top: 8px;
}

.auth-mini-chart span {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: var(--panel-3);
  min-height: 12%;
}

.auth-mini-chart span:nth-child(2n) { height: 44%; }
.auth-mini-chart span:nth-child(3n) { height: 72%; }
.auth-mini-chart span:nth-child(4n) { height: 30%; }
.auth-mini-chart span:nth-child(5n) { height: 88%; }
.auth-mini-chart span:nth-child(7n) { height: 58%; }
.auth-mini-chart span:nth-child(11n) { height: 96%; background: var(--accent); opacity: 0.5; }

.auth-card {
  padding: 44px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-card h1 {
  font-size: clamp(24px, 2.6vw, 29px);
  margin-top: 8px;
}

.auth-sub {
  margin: 10px 0 22px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
}

.auth-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 22px;
}

.auth-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.auth-step .n {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  color: var(--text);
  flex-shrink: 0;
}

.auth-back {
  margin-top: 18px;
  font-size: 12px;
}

.auth-back a {
  color: var(--accent);
}

/* ---------------- market page ---------------- */

.market-hero {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 16px;
}

.market-hero h1 {
  margin-top: 10px;
  font-size: clamp(28px, 3.4vw, 40px);
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
  overflow: hidden;
}

.stat-chip {
  padding: 12px 14px;
  background: var(--panel);
}

.stat-chip span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 500;
}

.stat-chip b {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.market-toolbar {
  flex-wrap: wrap;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: 11px;
  color: var(--muted-2);
  pointer-events: none;
}

.search-box input {
  width: 210px;
  min-height: 34px;
  padding-left: 33px;
  font-size: 12px;
}

.toolbar select {
  width: auto;
  min-height: 34px;
  font-size: 12px;
  padding: 6px 32px 6px 11px;
}

.mobile-market-list {
  display: none;
}

.mm-card {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background-color 0.14s var(--ease);
}

.mm-card:last-child {
  border-bottom: 0;
}

.mm-card:hover {
  background: var(--panel-2);
}

.mm-main {
  min-width: 0;
}

.mm-sym {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}

.mm-name {
  font-size: 10.5px;
  color: var(--muted-2);
}

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

.mm-price {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.mm-chg {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
}

.market-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.info-card {
  display: flex;
  gap: 12px;
  padding: 18px;
}

.info-ico {
  flex-shrink: 0;
  color: var(--muted);
}

.info-card h4 {
  font-size: 12.5px;
  margin-bottom: 4px;
}

.info-card p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------------- trade terminal ---------------- */

.symbol-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: thin;
}

.symbol-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--muted);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    background-color var(--dur) var(--ease);
  flex-shrink: 0;
}

.symbol-chip:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.symbol-chip.active {
  border-color: var(--accent-line);
  background: var(--accent-dim);
  color: var(--text);
}

.symbol-chip span.dim {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.trade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 14px;
}

.trade-title {
  display: flex;
  align-items: center;
  gap: 13px;
}

.trade-title .sym {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.trade-title .nm {
  font-size: 10.5px;
  color: var(--muted-2);
  margin-top: 2px;
}

.trade-price {
  font-family: var(--mono);
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trade-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.trade-stats .s small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 500;
}

.trade-stats .s span {
  font-family: var(--mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.terminal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 348px;
  gap: 14px;
  align-items: start;
}

.terminal > * {
  min-width: 0;
}

.chart-panel {
  padding: 0;
  overflow: hidden;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

#chart {
  width: 100%;
  height: 430px;
}

.intervals {
  display: inline-flex;
  gap: 1px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--input);
}

.intervals button {
  border: 0;
  background: none;
  color: var(--muted-2);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 500;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.intervals button:hover {
  color: var(--text);
}

.intervals button.active {
  background: var(--panel-3);
  color: var(--text);
}

.indicator-row {
  display: inline-flex;
  gap: 4px;
}

.ind-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted-2);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.ind-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.ind-btn.active {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-dim);
}

.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 10px;
  color: var(--muted-2);
}

.chart-legend b {
  color: var(--muted);
  font-weight: 500;
}

.depth-card {
  padding: 0;
  overflow: hidden;
}

.depth-chart {
  width: 100%;
  height: 150px;
  display: block;
}

.ob-scroll.asks,
.ob-scroll.bids {
  scrollbar-width: thin;
}

.depth-legend {
  display: flex;
  gap: 12px;
  font-size: 10px;
  color: var(--muted-2);
}

.depth-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.depth-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}

.trades-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.trade-list {
  max-height: 260px;
  overflow-y: auto;
}

.trade-line {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.trade-line span:last-child {
  text-align: right;
  color: var(--muted-2);
}

.orderbook-card {
  padding: 0;
  overflow: hidden;
}

.ob-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  padding: 8px 14px;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted-2);
  border-bottom: 1px solid var(--line);
}

.ob-scroll {
  max-height: 208px;
  overflow-y: auto;
}

.ob-row {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 6px;
  padding: 4px 14px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.ob-row .bar {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  opacity: 0.12;
}

.ob-row.ask .bar {
  background: var(--red);
}

.ob-row.bid .bar {
  background: var(--green);
}

.ob-row span {
  position: relative;
  z-index: 1;
}

.ob-row .a,
.ob-row .t {
  text-align: right;
  color: var(--muted);
}

.ob-row.ask .p {
  color: #ff9c9c;
}

.ob-row.bid .p {
  color: #6fe7b6;
}

.ob-row:hover {
  background: var(--panel-2);
}

.ob-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
}

.ob-mid .mid {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.spread {
  font-size: 10px;
  color: var(--muted-2);
}

.order-form {
  padding: 16px;
}

.order-form .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border-radius: 9px;
  background: var(--input);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

.order-form .tabs button {
  border: 0;
  background: none;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-2);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.order-form .tabs button.buy.active {
  background: var(--green-dim);
  color: var(--green);
}

.order-form .tabs button.sell.active {
  background: var(--red-dim);
  color: #ff9c9c;
}

.order-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  font-size: 11.5px;
  color: var(--muted);
}

.order-meta b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--text);
}

.fee-note {
  margin-top: 10px;
  font-size: 10.5px;
  line-height: 1.6;
  color: var(--muted-2);
}

.position-card {
  padding: 18px;
}

.order-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}

.order-line:first-child {
  border-top: 0;
}

.login-card {
  padding: 20px;
}

.cta-login-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px;
}

.cta-login-inline h3 {
  font-size: 16px;
  margin-bottom: 5px;
}

.cta-login-inline p {
  color: var(--muted);
  font-size: 12.5px;
  max-width: 620px;
}

/* ---------------- automation cards ---------------- */

.auto-card {
  padding: 0;
  overflow: hidden;
}

.auto-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.auto-head h3 {
  font-size: 13.5px;
  margin-bottom: 2px;
}

.auto-head p {
  font-size: 11px;
  color: var(--muted-2);
}

.auto-ico {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  flex-shrink: 0;
}

.ico-cyan,
.ico-violet,
.ico-green,
.ico-gold {
  background: var(--panel-2);
  border-color: var(--line);
  color: var(--accent);
}

.auto-card form {
  padding: 16px 18px;
}

.auto-list {
  padding: 6px 10px 8px;
}

.auto-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 6px;
  border-bottom: 1px solid var(--line);
}

.auto-item:last-child {
  border-bottom: 0;
}

.auto-item img {
  border-radius: 50%;
}

.ai-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ai-main b {
  font-size: 11.5px;
  font-weight: 500;
}

.ai-main small {
  font-size: 10px;
  color: var(--muted-2);
}

/* ---------------- portfolio / wallet ---------------- */

.pnl-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 6px 10px;
}

.big-number {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: clamp(23px, 2.8vw, 28px);
  font-weight: 500;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.pnl-change {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.pnl-change.up {
  background: var(--green-dim);
  border-color: rgba(62, 213, 152, 0.24);
}

.pnl-change.down {
  background: var(--red-dim);
  border-color: rgba(255, 110, 110, 0.24);
}

.pnl-chart {
  width: 100%;
  height: 230px;
  display: block;
}

.alloc-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--panel-3);
  gap: 2px;
}

.alloc-bar span {
  display: block;
  height: 100%;
  min-width: 2px;
}

.alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 13px;
  font-size: 11px;
  color: var(--muted);
}

.alloc-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.alloc-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  display: inline-block;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px;
  border-radius: 8px;
  transition: background-color 0.14s var(--ease);
}

.quick-action:hover {
  background: var(--panel-2);
}

.quick-action > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.quick-action b {
  font-size: 12.5px;
  font-weight: 500;
}

.quick-action small {
  font-size: 10.5px;
  color: var(--muted-2);
}

.qa-ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  flex-shrink: 0;
}

.qa-violet,
.qa-green,
.qa-gold,
.qa-cyan {
  background: var(--panel-2);
  color: var(--accent);
}

.quest-mini {
  padding: 6px 16px 12px;
}

.quest-mini-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quest-mini-row:last-child {
  border-bottom: 0;
}

.progress {
  height: 5px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
  transition: width 0.5s var(--ease);
}

.wallet-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding: 28px;
}

.wallet-total {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.wallet-total.small {
  font-size: 21px;
  letter-spacing: -0.02em;
}

.wallet-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.wallet-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
}

.wallet-hero-stats span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.wallet-hero-stats b {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.wallet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wallet-card {
  padding: 22px;
}

.wallet-card-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.wallet-card-head h3 {
  font-size: 15px;
  margin-bottom: 3px;
}

.wallet-card-head .desc {
  font-size: 11.5px;
  color: var(--muted-2);
}

/* ---------------- rewards ---------------- */

.reward-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
  padding: 28px;
}

.reward-hero-copy h2 {
  margin: 10px 0 6px;
  font-size: clamp(21px, 2.4vw, 27px);
}

.reward-hero-copy p {
  font-size: 12.5px;
  color: var(--muted);
}

.reward-ready {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 500;
}

.reward-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.reward-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent) 0 calc(var(--p, 0) * 1%), var(--panel-3) 0);
}

.reward-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
}

.reward-ring span {
  position: relative;
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.reward-progress small {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
  font-weight: 500;
}

.quest-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.quest-card h3 {
  margin: 13px 0 5px;
  font-size: 14.5px;
}

.quest-body {
  font-size: 12px;
  line-height: 1.6;
  min-height: 37px;
  color: var(--muted);
}

.quest-card .progress {
  margin-top: auto;
}

.quest-progress-text {
  font-family: var(--mono);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.quest-claimed {
  opacity: 0.6;
}

.reward-amount {
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.redeem-card {
  padding: 24px;
}

.redeem-card h2 {
  margin: 7px 0 6px;
  font-size: 21px;
}

.redeem-sub {
  font-size: 12.5px;
  max-width: 430px;
  color: var(--muted);
}

.redeem-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.redeem-form .field {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0;
}

.redeem-form .btn {
  min-height: 40px;
}

.redeem-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.reward-wallet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px 20px;
}

.redeem-steps {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 4px 2px 0;
}

.redeem-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.redeem-step span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
}

.redeem-step p {
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------------- leaderboard ---------------- */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 22px;
}

.podium-card {
  position: relative;
  flex: 1;
  max-width: 250px;
  padding: 22px 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: center;
}

.podium-card.rank-1 {
  transform: translateY(-12px);
  border-color: var(--accent-line);
}

.podium-card.is-me {
  border-color: var(--line-strong);
  background: var(--panel-2);
}

.podium-medal {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
}

.medal {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text);
  background: var(--panel-3);
}

.medal-2,
.medal-3 {
  background: var(--panel-2);
  color: var(--muted);
}

.podium-avatar {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin: 4px auto 9px;
  border-radius: 50%;
  background: var(--panel-3);
  border: 1px solid var(--line);
  font-size: 18px;
  font-weight: 500;
}

.podium-name {
  font-size: 13px;
  font-weight: 500;
}

.podium-pnl {
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.podium-value {
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted-2);
}

.my-rank {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.my-rank-pos {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.my-rank-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.my-rank-main b {
  font-size: 12.5px;
  font-weight: 500;
}

.my-rank-main span {
  font-size: 10.5px;
  color: var(--muted-2);
}

.my-rank-stat {
  margin-left: auto;
  text-align: right;
}

.my-rank-stat small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted-2);
}

.my-rank-stat b {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------------- admin ---------------- */

.admin-page {
  padding-bottom: 48px;
}

.admin-tabs {
  margin-bottom: 16px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 14px;
  margin-bottom: 6px;
}

.settings-grid .field-full {
  grid-column: 1 / -1;
}

.redeem-editor .card-head {
  padding: 16px 20px;
}

.redeem-editor form {
  padding: 18px 20px 20px;
}

.redeem-editor form > .btn {
  margin-top: 6px;
}

.mini-stat-list {
  padding: 8px 20px 14px;
}

.mini-stat-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 11.5px;
}

.mini-stat-list > div:last-child {
  border-bottom: 0;
}

.mini-stat-list span {
  color: var(--muted);
}

.mini-stat-list b {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.row-actions {
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.redeem-code-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.redeem-code-cell b {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.redeem-code-cell small {
  font-size: 10px;
  color: var(--muted-2);
}

.admin-table td {
  font-size: 12px;
}

.admin-table th {
  font-size: 9.5px;
}

.redeem-stats-card .alert {
  margin: 0 16px 16px;
}

/* ---------------- guide ---------------- */

.guide-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.guide-nav {
  position: sticky;
  top: calc(var(--nav-h) + 18px);
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.guide-nav .gh {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted-2);
  font-weight: 500;
  padding: 10px 10px 4px;
}

.guide-nav a {
  display: block;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 11.5px;
  color: var(--muted);
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}

.guide-nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.guide-section {
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--line);
}

.guide-section:first-child {
  padding-top: 4px;
}

.guide-section:last-child {
  border-bottom: 0;
}

.guide-section h2 {
  display: flex;
  align-items: baseline;
  gap: 11px;
  font-size: clamp(19px, 2.1vw, 22px);
  margin-bottom: 13px;
}

.guide-section h2 .n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  font-weight: 500;
}

.guide-section h3 {
  font-size: 14px;
  margin: 20px 0 7px;
}

.guide-section p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.78;
  margin-bottom: 10px;
}

.guide-section ul,
.guide-section ol {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  margin-bottom: 12px;
}

.guide-section li {
  margin-bottom: 5px;
}

.guide-section b {
  color: var(--text);
  font-weight: 500;
}

.guide-section a {
  color: var(--accent);
}

.guide-section table.data {
  margin: 12px 0;
}

.guide-section code {
  font-size: 11px;
}

.callout {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
  margin: 14px 0;
}

.callout.warn {
  border-left-color: var(--red);
}

/* ---------------- toasts ---------------- */

#toasts {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 28px));
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  font-size: 12.5px;
  line-height: 1.5;
  animation: slideIn 0.2s var(--ease);
}

.toast.ok {
  border-color: rgba(62, 213, 152, 0.35);
}

.toast.bad {
  border-color: rgba(255, 110, 110, 0.4);
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------- motion ---------------- */

.reveal {
  animation: fadeUp 0.5s var(--ease) both;
}

.reveal:nth-child(2) {
  animation-delay: 0.05s;
}

.reveal:nth-child(3) {
  animation-delay: 0.1s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

/* ---------------- responsive ---------------- */

@media (max-width: 1120px) {
  .terminal {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
  .advanced-grid,
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-grid {
    gap: 36px;
  }
  .nav-links a {
    padding: 7px 9px;
    font-size: 12.5px;
  }
  .nav-balance {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero {
    padding: 64px 0 48px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .hero-visual {
    max-width: 560px;
  }
  .two-col,
  .dash-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .terminal {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .auth-aside {
    display: none;
  }
  .g4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trust-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .market-info-grid {
    grid-template-columns: 1fr;
  }
  .guide-grid {
    grid-template-columns: 1fr;
  }
  .guide-nav {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .guide-nav .gh {
    grid-column: 1 / -1;
    padding-top: 8px;
  }
  .foot {
    grid-template-columns: 1fr 1fr;
  }
  .stats-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-strip > div:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .stats-strip > div:nth-child(4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) + 8px);
    left: 12px;
    right: 12px;
    z-index: 80;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
  }
  .nav-links.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }
  .nav-links a {
    padding: 11px 12px;
    font-size: 13px;
  }
  .nav-burger {
    display: flex;
  }
  .nav-mobile-only {
    display: block;
  }
  .nav-name {
    display: none;
  }
  .nav-user {
    padding: 4px;
  }
  .nav-balance {
    display: none;
  }
  .terminal {
    grid-template-columns: 1fr;
  }
  .orderbook-card {
    order: 2;
  }
  .orderbook-card .ob-scroll {
    max-height: 180px;
  }
  .advanced-grid {
    grid-template-columns: 1fr;
  }
  .podium-card {
    padding: 18px 10px 15px;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-h: 60px;
  }
  body {
    font-size: 14.5px;
    padding-bottom: 64px;
  }
  .container {
    width: calc(100% - 28px);
  }
  .page {
    padding: 28px 0 48px;
  }
  .nav-inner {
    width: calc(100% - 24px);
    gap: 10px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand-text b {
    font-size: 14.5px;
  }
  .nav-logout {
    display: none;
  }
  .mobile-nav {
    display: block;
  }
  .nav-login-link {
    display: none;
  }
  .desktop-market-table {
    display: none;
  }
  .mobile-market-list {
    display: block;
  }
  .hide-sm {
    display: none !important;
  }
  .g3,
  .g4 {
    grid-template-columns: 1fr;
  }
  .kpi-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-strip .v {
    font-size: 16px;
  }
  .stats-strip > div {
    padding: 14px 16px;
  }
  .hero h1 {
    font-size: clamp(32px, 8.6vw, 42px);
  }
  .hero .lead {
    font-size: 15px;
  }
  .hero-actions .btn {
    flex: 1;
  }
  .hero-chips {
    gap: 5px;
  }
  .section {
    padding: 48px 0;
  }
  .cta-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
  }
  .trust-strip {
    grid-template-columns: 1fr 1fr;
  }
  .steps {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .market-hero {
    padding: 20px;
  }
  .market-stats {
    grid-template-columns: 1fr 1fr;
  }
  .search-box {
    flex: 1;
  }
  .search-box input {
    width: 100%;
  }
  .trade-head {
    padding: 14px 16px;
    gap: 14px;
  }
  .chart-toolbar > .row {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 2px;
  }
  .intervals,
  .indicator-row {
    flex-shrink: 0;
  }
  .trade-stats {
    gap: 16px;
  }
  .trade-stats .s span {
    font-size: 11.5px;
  }
  #chart {
    height: 330px;
  }
  .depth-chart {
    height: 110px;
  }
  .trades-row {
    grid-template-columns: 1fr;
  }
  .wallet-hero {
    padding: 22px;
  }
  .wallet-grid {
    grid-template-columns: 1fr;
  }
  .wallet-hero-stats {
    width: 100%;
  }
  .reward-hero {
    padding: 22px;
  }
  .reward-ring {
    width: 76px;
    height: 76px;
  }
  .redeem-card {
    padding: 20px;
  }
  .reward-wallet {
    grid-template-columns: 1fr;
  }
  .podium {
    gap: 8px;
  }
  .podium-card.rank-1 {
    transform: translateY(-8px);
  }
  .podium-avatar {
    width: 42px;
    height: 42px;
    font-size: 16px;
  }
  .podium-pnl {
    font-size: 12px;
  }
  .podium-value {
    font-size: 9.5px;
  }
  .my-rank {
    gap: 10px;
  }
  .my-rank-stat {
    margin-left: 0;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .auth-wrap {
    padding: 20px 14px 40px;
  }
  .auth-card {
    padding: 28px 22px;
  }
  .auth-shell {
    border-radius: var(--radius);
  }
  .foot {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .foot-brand {
    grid-column: 1 / -1;
  }
  .foot-bottom {
    font-size: 10.5px;
  }
  .admin-table td,
  .admin-table th {
    padding: 10px 12px;
  }
  #toasts {
    bottom: 76px;
    right: 12px;
  }
  .notif-panel {
    position: fixed;
    top: calc(var(--nav-h) + 8px);
    right: 10px;
    left: 10px;
    width: auto;
  }
  .guide-nav {
    grid-template-columns: 1fr 1fr;
  }
  table.data th,
  table.data td {
    padding: 11px 13px;
  }
}

@media (max-width: 560px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .page-head {
    gap: 14px;
  }
  .page-head h1 {
    font-size: 26px;
  }
  .hero-chips {
    display: none;
  }
  .stats-strip {
    grid-template-columns: 1fr;
  }
  .stats-strip > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .market-stats {
    grid-template-columns: 1fr 1fr;
  }
  .cta-actions {
    width: 100%;
  }
  .cta-actions .btn {
    flex: 1;
  }
  .podium {
    align-items: stretch;
    flex-direction: column;
  }
  .podium-card {
    max-width: none;
    transform: none !important;
  }
  .podium-medal {
    position: static;
    transform: none;
    display: inline-grid;
    margin-bottom: 6px;
  }
  .my-rank-stat {
    flex: 1 1 40%;
    text-align: left;
  }
  .nav-actions .btn-primary {
    display: none;
  }
  .foot {
    grid-template-columns: 1fr;
  }
  .foot-brand {
    grid-column: auto;
  }
  .guide-nav {
    grid-template-columns: 1fr;
  }
  .trade-price {
    font-size: 23px;
  }
  .redeem-form {
    flex-direction: column;
    align-items: stretch;
  }
  .redeem-form .btn {
    width: 100%;
  }
  .auto-head {
    padding: 15px;
  }
  .card-head {
    padding: 14px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ticker-track {
    animation: none !important;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .nav,
  .mobile-nav {
    background: var(--bg);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
