:root {
  color-scheme: dark;
  --bg: #09090b;
  --bg-elevated: #0f1012;
  --bg-panel: rgba(17, 18, 20, 0.96);
  --bg-panel-strong: #141519;
  --bg-soft: rgba(255, 255, 255, 0.03);
  --bg-soft-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f5;
  --muted: #a1a1aa;
  --muted-strong: #d4d4d8;
  --accent: #f5f7fa;
  --accent-ink: #09090b;
  --brand: #60a5fa;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --shadow-xl: 0 18px 42px rgba(0, 0, 0, 0.34);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.28);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.04), transparent 32%),
    linear-gradient(180deg, #0b0b0d 0%, #09090b 100%);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at top, #000 0%, transparent 78%);
  opacity: 0.38;
  pointer-events: none;
}

body.sidebar-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.auth-body {
  display: grid;
  min-height: 100vh;
  padding: 24px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 500px);
  gap: 20px;
  width: min(1240px, 100%);
  margin: auto;
}

.auth-brand-panel,
.auth-form-panel,
.exchange-card,
.exchange-stat,
.exchange-table-wrap,
.exchange-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(18, 19, 22, 0.98), rgba(14, 15, 18, 0.98));
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(16px);
}

.auth-brand-panel {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 720px;
}

.auth-form-panel {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-lockup,
.exchange-topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #f4f4f5;
  color: #09090b;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-title {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.8rem;
}

.auth-hero {
  display: grid;
  gap: 22px;
}

.auth-kicker,
.page-eyebrow {
  margin: 0;
  color: #71717a;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  font-weight: 700;
}

.auth-title,
.page-title {
  margin: 0;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-title {
  max-width: 8.5em;
}

.auth-copy,
.page-subtitle,
.metric-copy,
.sidebar-guest p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
}

.metric-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.15rem;
  font-weight: 600;
}

.metric-copy {
  margin-top: 8px;
  font-size: 0.84rem;
}

.auth-form-header {
  margin-bottom: 24px;
}

.auth-form-header h1 {
  margin: 0 0 10px;
  font-size: 1.85rem;
  font-weight: 800;
}

.auth-form-header p {
  margin: 0;
  color: var(--muted);
}

.exchange-form {
  display: grid;
  gap: 18px;
}

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 10px;
}

.field--full {
  grid-column: 1 / -1;
}

.label {
  font-size: 0.88rem;
  color: var(--muted-strong);
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px 16px;
}

.select::-ms-expand {
  display: none;
}

.select option {
  background: #111214;
  color: #f5f5f5;
}

.select-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.custom-select {
  position: relative;
}

.custom-select__trigger {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  min-height: 48px;
  padding: 13px 44px 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.custom-select__trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6L8 10L12 6' stroke='%23a1a1aa' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px 16px;
  transition: transform 0.2s ease;
}

.custom-select.is-open .custom-select__trigger,
.custom-select__trigger:focus-visible {
  border-color: rgba(244, 244, 245, 0.24);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.05);
  outline: none;
}

.custom-select.is-open .custom-select__trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select__value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-select__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 45;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: #111214;
  box-shadow: var(--shadow-xl);
  padding: 8px;
  display: none;
  max-height: 280px;
  overflow-y: auto;
}

.custom-select.is-open .custom-select__menu {
  display: grid;
  gap: 4px;
}

.custom-select__option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted-strong);
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.custom-select__option:hover,
.custom-select__option.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.custom-select__option.is-placeholder {
  color: var(--muted);
}

.textarea {
  min-height: 132px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(244, 244, 245, 0.24);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.05);
}

.input[readonly],
.input[disabled],
.textarea[disabled] {
  color: #d4d4d8;
  background: rgba(255, 255, 255, 0.04);
}

.field-help {
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.field-error {
  color: #fda4af;
  font-size: 0.8rem;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button-row form {
  display: inline-flex;
}

.button {
  border: 1px solid transparent;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.button:disabled,
.button.is-loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-secondary {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
}

.button-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.18);
}

.button-success {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
  border-color: rgba(34, 197, 94, 0.18);
}

.button-compact {
  min-height: 38px;
  padding: 0 14px;
}

.button-block {
  width: 100%;
}

.text-link {
  color: #e4e4e7;
  font-weight: 600;
}

.auth-footer {
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.exchange-shell {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  min-height: 100vh;
}

.exchange-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 16px 96px;
  border-right: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(18px);
  overflow-y: auto;
  z-index: 30;
}

.exchange-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.sidebar-account,
.sidebar-guest {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
}

.sidebar-account {
  display: flex;
  gap: 14px;
  align-items: center;
}

.sidebar-account__avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: cover;
}

.sidebar-account__name {
  font-size: 0.96rem;
  font-weight: 700;
}

.sidebar-account__meta {
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-guest__actions {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.sidebar-nav {
  display: grid;
  gap: 22px;
}

.sidebar-group {
  display: grid;
  gap: 8px;
}

.sidebar-group__label {
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  color: var(--muted-strong);
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.sidebar-link.is-active {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.sidebar-link svg,
.exchange-bottom-nav svg,
.icon-button svg,
.topbar-link svg {
  width: 18px;
  height: 18px;
}

.exchange-main {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr;
}

.exchange-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.86);
  backdrop-filter: blur(18px);
}

.exchange-topbar__left,
.exchange-topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.exchange-topbar__center {
  display: flex;
  justify-content: center;
  gap: 12px;
  overflow-x: auto;
}

.market-chip {
  min-width: 116px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 2px;
}

.market-chip__symbol {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.market-chip__price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
}

.market-chip__change {
  font-size: 0.76rem;
  color: var(--muted);
}

.market-chip__change.is-up {
  color: var(--success);
}

.market-chip__change.is-down {
  color: var(--danger);
}

.topbar-link,
.profile-chip,
.wallet-pill {
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.025);
}

.topbar-link.is-active,
.profile-chip:hover,
.topbar-link:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.wallet-pill {
  font-family: 'JetBrains Mono', monospace;
}

.profile-chip__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
}

.exchange-content {
  padding: 24px;
}

.page-header-block {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-title {
  font-size: clamp(1.65rem, 3.6vw, 2.35rem);
}

.page-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.exchange-grid {
  display: grid;
  gap: 20px;
}

.exchange-grid-2 {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.4fr 0.9fr;
}

.exchange-grid-3 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exchange-grid-4 {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.exchange-stat,
.exchange-card,
.exchange-panel {
  padding: 20px;
}

.exchange-panel__header,
.exchange-table__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
}

.panel-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.stat-value {
  margin: 10px 0 0;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}

.stat-footnote {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-badge {
  border-radius: 999px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-badge.is-success {
  background: rgba(23, 199, 132, 0.12);
  color: #bbf7d0;
}

.status-badge.is-danger {
  background: rgba(246, 70, 93, 0.12);
  color: #fecdd3;
}

.status-badge.is-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}

.status-badge.is-info {
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
}

.status-badge.is-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
}

.exchange-table-wrap {
  padding: 20px;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.exchange-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.exchange-table th,
.exchange-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

.exchange-table th {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.exchange-table td {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.exchange-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table-number {
  font-family: 'JetBrains Mono', monospace;
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

.text-warning {
  color: var(--warning);
}

.text-muted {
  color: var(--muted);
}

.empty-state {
  padding: 28px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}

.split-card {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr minmax(260px, 360px);
}

.symbol-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.symbol-tab {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 700;
  cursor: pointer;
}

.symbol-tab.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.quote-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
}

.quote-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quote-row strong {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1rem;
}

.kline-shell {
  display: grid;
  gap: 18px;
}

.kline-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.market-list {
  display: grid;
  gap: 10px;
}

.market-list-item {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.market-list-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.market-list-item.is-active {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.market-list-item__meta {
  display: grid;
  gap: 4px;
}

.market-list-item__symbol {
  font-weight: 800;
}

.market-list-item__name {
  color: var(--muted);
  font-size: 0.82rem;
}

.market-list-item__price {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
}

.chart-panel {
  min-height: 500px;
}

.chart-panel__header {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chart-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.chart-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.time-switcher {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.time-switcher button {
  min-width: 54px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted-strong);
  padding: 9px 12px;
  cursor: pointer;
  font-weight: 700;
}

.time-switcher button.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.chart-canvas {
  width: 100%;
  height: 420px;
}

.chart-stage {
  position: relative;
}

.chart-loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: rgba(9, 9, 11, 0.6);
  backdrop-filter: blur(4px);
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  z-index: 3;
}

.chart-loading.is-visible {
  display: flex;
}

.chart-placeholder {
  height: 100%;
  min-height: 420px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}

.info-banner {
  padding: 16px 18px;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(96, 165, 250, 0.08);
  color: #dbeafe;
  line-height: 1.7;
}

.trade-panel-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.05fr 0.95fr;
}

.trade-summary {
  display: grid;
  gap: 12px;
}

.trade-summary__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-summary__row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.tabs-nav {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.tabs-nav a {
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.tabs-nav a.is-active {
  background: var(--accent);
  color: var(--accent-ink);
}

.hero-stat-row {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.action-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-tile {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.025);
  display: grid;
  gap: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.action-tile:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.action-tile__title {
  font-weight: 700;
}

.action-tile__copy {
  color: var(--muted);
  font-size: 0.84rem;
}

.avatar-panel {
  display: grid;
  gap: 14px;
  justify-items: start;
}

.avatar-panel__image {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 24px;
  border: 1px solid var(--border);
}

.inline-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.84rem;
}

.address-short {
  display: inline-block;
  max-width: 240px;
  overflow-wrap: anywhere;
}

.created-date-cell {
  min-width: 220px;
}

.date-display {
  color: var(--muted-strong);
}

.timeline-note {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.modal-shell {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(3, 5, 9, 0.72);
  z-index: 80;
}

.modal-shell.is-open {
  display: flex;
}

.modal-card {
  width: min(520px, 100%);
  padding: 26px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(18, 19, 22, 0.98), rgba(14, 15, 18, 0.98));
  box-shadow: var(--shadow-xl);
}

.modal-card__header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.date-editor {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.toast-root {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
}

.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(17, 18, 20, 0.98);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateY(0);
  opacity: 1;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.toast-info .toast__icon {
  background: var(--info);
}

.toast-success .toast__icon {
  background: var(--success);
}

.toast-danger .toast__icon {
  background: var(--danger);
}

.toast__icon {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.toast__body {
  line-height: 1.6;
}

.toast-leave {
  transform: translateY(-8px);
  opacity: 0;
}

.sidebar-backdrop {
  display: none;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 1200px) {
  .exchange-grid-4,
  .hero-stat-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exchange-grid-2,
  .split-card,
  .trade-panel-grid,
  .kline-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .auth-shell,
  .exchange-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand-panel {
    min-height: auto;
  }

  .exchange-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(84vw, 320px);
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 5, 9, 0.6);
    z-index: 25;
  }

  body.sidebar-open .exchange-sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .exchange-topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 14px;
    padding: 14px 18px;
  }

  .exchange-topbar__left,
  .exchange-topbar__right {
    justify-content: space-between;
  }

  .exchange-topbar__center {
    justify-content: flex-start;
  }

  .exchange-content {
    padding: 18px 18px 96px;
  }

  .page-header-block {
    flex-direction: column;
    align-items: stretch;
  }

  .exchange-bottom-nav {
    position: fixed;
    left: 14px;
    right: 14px;
    bottom: 14px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(10, 10, 12, 0.94);
    backdrop-filter: blur(18px);
    z-index: 40;
  }

  .exchange-bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 0.72rem;
    padding: 8px 4px;
    border-radius: 14px;
  }

  .exchange-bottom-nav a.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 720px) {
  .form-grid,
  .form-grid-3,
  .exchange-grid-3,
  .exchange-grid-4,
  .hero-stat-row,
  .action-grid,
  .auth-metrics {
    grid-template-columns: 1fr;
  }

  .auth-body {
    padding: 16px;
  }

  .auth-brand-panel,
  .auth-form-panel,
  .exchange-card,
  .exchange-stat,
  .exchange-table-wrap,
  .exchange-panel {
    padding: 20px;
    border-radius: 16px;
  }

  .exchange-table {
    min-width: 620px;
  }
}
