@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
    --tx-bg: #f4f6fa;
    --tx-surface: #ffffff;
    --tx-surface-2: #eef2f7;
    --tx-surface-3: #e3e9f1;
    --tx-border: #e1e7ef;
    --tx-text: #0e1c2f;
    --tx-text-2: #33475f;
    --tx-muted: #6b7a90;
    --tx-primary: #1a3860;
    --tx-primary-hover: #132b4b;
    --tx-primary-text: #1a3860;
    --tx-on-primary: #ffffff;
    --tx-primary-soft: #e8eef7;
    --tx-primary-ring: rgba(26, 56, 96, 0.22);
    --tx-success: #0a9b6a;
    --tx-success-soft: #e6f6ef;
    --tx-danger: #d63a4f;
    --tx-danger-soft: #fcebed;
    --tx-warning: #c27a06;
    --tx-warning-soft: #fdf3e1;
    --tx-info: #2a74d0;
    --tx-info-soft: #e8f1fc;
    --tx-brand-grad: linear-gradient(135deg, #24497a, #1a3860);
    --tx-shadow-sm: 0 1px 2px rgba(14, 28, 47, 0.05);
    --tx-shadow: 0 1px 2px rgba(14, 28, 47, 0.04), 0 4px 16px rgba(14, 28, 47, 0.06);
    --tx-shadow-lg: 0 12px 40px rgba(14, 28, 47, 0.12);
    --tx-radius-sm: 10px;
    --tx-radius: 14px;
    --tx-radius-lg: 20px;
    --tx-sidebar: 248px;
    --tx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --tx-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

.dark-theme {
    --tx-bg: #060d19;
    --tx-surface: #0b1626;
    --tx-surface-2: #102035;
    --tx-surface-3: #172b45;
    --tx-border: #1a2d48;
    --tx-text: #e9eef6;
    --tx-text-2: #b3c0d3;
    --tx-muted: #7f91ab;
    --tx-primary: #3874d8;
    --tx-primary-hover: #4c86e6;
    --tx-primary-text: #7fb0ff;
    --tx-on-primary: #ffffff;
    --tx-primary-soft: rgba(56, 116, 216, 0.16);
    --tx-primary-ring: rgba(56, 116, 216, 0.35);
    --tx-success: #16c784;
    --tx-success-soft: rgba(22, 199, 132, 0.12);
    --tx-danger: #ea3943;
    --tx-danger-soft: rgba(234, 57, 67, 0.12);
    --tx-warning: #f5b540;
    --tx-warning-soft: rgba(245, 181, 64, 0.12);
    --tx-info: #5aa3f5;
    --tx-info-soft: rgba(90, 163, 245, 0.12);
    --tx-brand-grad: linear-gradient(135deg, #2a5591, #1a3860);
    --tx-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --tx-shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 6px 20px rgba(0, 0, 0, 0.25);
    --tx-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
}

[hidden] { display: none !important; }

/* ---------- Base ---------- */

.tx-body {
    margin: 0;
    min-height: 100vh;
    background: var(--tx-bg);
    color: var(--tx-text);
    font-family: var(--tx-font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.tx-body a {
    color: var(--tx-primary-text);
    text-decoration: none;
}

.tx-body h1, .tx-body h2, .tx-body h3, .tx-body h4, .tx-body h5 {
    margin: 0;
    color: var(--tx-text);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.tx-body p {
    margin: 0;
}

.tx-body code,
.tx-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
}

.tx-muted { color: var(--tx-muted); }
.tx-up { color: var(--tx-success); }
.tx-down { color: var(--tx-danger); }
.tx-num { font-variant-numeric: tabular-nums; }
.tx-hidden { display: none !important; }
.tx-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ---------- App shell ---------- */

.tx-app {
    display: grid;
    grid-template-columns: var(--tx-sidebar) 1fr;
    min-height: 100vh;
}

.tx-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 14px;
    background: var(--tx-surface);
    border-right: 1px solid var(--tx-border);
    z-index: 30;
}

.tx-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 22px;
    color: var(--tx-text) !important;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tx-brand-mark svg { width: 58%; height: auto; display: block; }

.tx-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--tx-brand-grad);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 6px 16px var(--tx-primary-ring);
}

.tx-nav-label {
    padding: 14px 12px 6px;
    color: var(--tx-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tx-nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--tx-radius-sm);
    color: var(--tx-text-2) !important;
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s var(--tx-ease);
}

.tx-nav-link i {
    font-size: 18px;
    transition: transform 0.25s var(--tx-ease);
}

.tx-nav-link:hover {
    background: var(--tx-surface-2);
    color: var(--tx-text) !important;
}

.tx-nav-link:hover i {
    transform: translateX(2px) scale(1.06);
}

.tx-nav-link.is-active {
    background: var(--tx-primary-soft);
    color: var(--tx-primary-text) !important;
    font-weight: 600;
}

.tx-nav-link.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--tx-primary);
}

.tx-sidebar-foot {
    margin-top: auto;
}

.tx-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.tx-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: color-mix(in srgb, var(--tx-bg) 82%, transparent);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tx-topbar.is-scrolled {
    border-bottom-color: var(--tx-border);
    box-shadow: var(--tx-shadow-sm);
}

.tx-topbar-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tx-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.tx-ticker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border: 1px solid var(--tx-border);
    border-radius: 999px;
    background: var(--tx-surface);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    box-shadow: var(--tx-shadow-sm);
}

.tx-ticker .cc { font-size: 16px; color: #f7931a; }
.tx-coin { flex: none; display: block; border-radius: 50%; }

.tx-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--tx-success);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5);
    animation: tx-pulse 2s infinite;
}

.tx-content {
    padding: 8px 28px 40px;
    max-width: 1440px;
    width: 100%;
}

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

.tx-page-head h1 {
    font-size: 26px;
    letter-spacing: -0.025em;
}

.tx-page-head p {
    margin-top: 4px;
    color: var(--tx-muted);
}

.tx-bottom-nav {
    display: none;
}

/* ---------- Grid ---------- */

.tx-grid {
    display: grid;
    gap: 18px;
}

.tx-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tx-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tx-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tx-grid-main { grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); }
.tx-stack { display: flex; flex-direction: column; gap: 18px; }
.tx-row { display: flex; align-items: center; gap: 10px; }
.tx-row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tx-wrap { flex-wrap: wrap; }
.tx-mt { margin-top: 18px; }
.tx-mt-sm { margin-top: 10px; }

/* ---------- Cards ---------- */

.tx-card {
    position: relative;
    background: var(--tx-surface);
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    box-shadow: var(--tx-shadow-sm);
    transition: transform 0.25s var(--tx-ease), box-shadow 0.25s var(--tx-ease), border-color 0.25s ease, background-color 0.3s ease;
}

.tx-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--tx-shadow);
    border-color: color-mix(in srgb, var(--tx-primary) 20%, var(--tx-border));
}

.tx-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px 0;
}

.tx-card-head h3 {
    font-size: 15px;
    font-weight: 650;
}

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

.tx-stat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 20px;
}

.tx-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tx-stat-label {
    color: var(--tx-muted);
    font-size: 13px;
    font-weight: 500;
}

.tx-stat-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--tx-primary-soft);
    color: var(--tx-primary-text);
    font-size: 17px;
    transition: transform 0.3s var(--tx-ease);
}

.tx-card-hover:hover .tx-stat-icon {
    transform: rotate(-6deg) scale(1.06);
}

.tx-stat-icon.is-success { background: var(--tx-success-soft); color: var(--tx-success); }
.tx-stat-icon.is-warning { background: var(--tx-warning-soft); color: var(--tx-warning); }
.tx-stat-icon.is-btc { background: rgba(247, 147, 26, 0.12); color: #f7931a; }

.tx-stat-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.tx-stat-value small {
    margin-left: 4px;
    color: var(--tx-muted);
    font-size: 13px;
    font-weight: 600;
}

.tx-stat-sub {
    color: var(--tx-muted);
    font-size: 12.5px;
}

.tx-hero-card {
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(72, 140, 255, 0.38), transparent 55%),
        linear-gradient(135deg, #1a3860, #0b1626);
    border: 0;
    color: #fff;
}

.tx-hero-card .tx-stat-label,
.tx-hero-card .tx-stat-sub,
.tx-hero-card .tx-stat-value small { color: rgba(255, 255, 255, 0.78); }
.tx-hero-card .tx-stat-value { color: #fff; font-size: 30px; }
.tx-hero-card .tx-stat-icon { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ---------- Buttons ---------- */

.tx-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--tx-radius-sm);
    background: var(--tx-surface-2);
    color: var(--tx-text) !important;
    font: 600 14px/1 var(--tx-font);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: transform 0.12s var(--tx-ease), background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.tx-btn:hover { background: var(--tx-surface-3); }
.tx-btn:active { transform: scale(0.97); }
.tx-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--tx-primary-ring); }
.tx-btn[disabled], .tx-btn.is-loading { opacity: 0.75; pointer-events: none; }

.tx-btn-primary {
    background: var(--tx-primary);
    color: var(--tx-on-primary) !important;
    box-shadow: 0 4px 14px var(--tx-primary-ring);
}

.tx-btn-primary:hover { background: var(--tx-primary-hover); box-shadow: 0 6px 20px var(--tx-primary-ring); }
.tx-btn-success { background: var(--tx-success); color: #fff !important; }
.tx-btn-success:hover { background: color-mix(in srgb, var(--tx-success) 88%, #000); }
.tx-btn-danger { background: var(--tx-danger); color: #fff !important; }
.tx-btn-danger:hover { background: color-mix(in srgb, var(--tx-danger) 88%, #000); }
.tx-btn-ghost { background: transparent; border-color: var(--tx-border); }
.tx-btn-ghost:hover { background: var(--tx-surface-2); }
.tx-btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.tx-btn-block { width: 100%; min-height: 46px; }

.tx-icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tx-border);
    border-radius: 12px;
    background: var(--tx-surface);
    color: var(--tx-text-2);
    font-size: 17px;
    cursor: pointer;
    transition: transform 0.12s var(--tx-ease), background-color 0.18s ease, color 0.18s ease;
}

.tx-icon-btn:hover { background: var(--tx-surface-2); color: var(--tx-text); }
.tx-icon-btn:active { transform: scale(0.92); }

.tx-icon-btn .tx-dot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid var(--tx-bg);
    border-radius: 999px;
    background: var(--tx-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    animation: tx-pop 0.4s var(--tx-ease);
}

.tx-theme-toggle .bi-sun { display: none; }
.dark-theme .tx-theme-toggle .bi-sun { display: inline; }
.dark-theme .tx-theme-toggle .bi-moon-stars { display: none; }
.tx-theme-toggle i { transition: transform 0.45s var(--tx-ease); }
.tx-theme-toggle:hover i { transform: rotate(-25deg); }

.tx-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: tx-spin 0.7s linear infinite;
}

/* ---------- Forms ---------- */

.tx-field { display: flex; flex-direction: column; gap: 7px; }
.tx-field + .tx-field { margin-top: 14px; }

.tx-label {
    color: var(--tx-text-2);
    font-size: 13px;
    font-weight: 600;
}

.tx-input,
.tx-select,
.tx-textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-sm);
    background: var(--tx-surface);
    color: var(--tx-text);
    font: 500 14px var(--tx-font);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.tx-textarea { min-height: 88px; resize: vertical; }

.tx-input::placeholder { color: color-mix(in srgb, var(--tx-muted) 75%, transparent); }

.tx-input:hover,
.tx-select:hover,
.tx-textarea:hover { border-color: color-mix(in srgb, var(--tx-primary) 30%, var(--tx-border)); }

.tx-input:focus,
.tx-select:focus,
.tx-textarea:focus {
    outline: none;
    border-color: var(--tx-primary);
    box-shadow: 0 0 0 4px var(--tx-primary-ring);
}

.tx-input.is-invalid { border-color: var(--tx-danger); animation: tx-shake 0.35s var(--tx-ease); }

.tx-input-group { position: relative; }
.tx-input-group .tx-input { padding-right: 64px; }
.tx-input-suffix {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    color: var(--tx-muted);
    font-weight: 600;
    pointer-events: none;
}

.tx-error {
    color: var(--tx-danger);
    font-size: 12.5px;
    font-weight: 500;
    animation: tx-slide-down 0.25s var(--tx-ease);
}

.tx-hint { color: var(--tx-muted); font-size: 12.5px; }

.tx-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--tx-text-2);
    font-size: 13px;
    cursor: pointer;
}

.tx-check input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--tx-primary);
}

.tx-segment {
    display: grid;
    grid-auto-columns: 1fr;
    grid-auto-flow: column;
    padding: 4px;
    border-radius: 12px;
    background: var(--tx-surface-2);
}

.tx-segment button,
.tx-segment a {
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--tx-muted) !important;
    font: 600 13px var(--tx-font);
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tx-segment .is-active {
    background: var(--tx-surface);
    color: var(--tx-text) !important;
    box-shadow: var(--tx-shadow-sm);
}

.tx-segment .is-active.is-buy { color: var(--tx-success) !important; }
.tx-segment .is-active.is-sell { color: var(--tx-danger) !important; }

.tx-pills {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 3px;
    border: 1px solid var(--tx-border);
    border-radius: 11px;
    background: var(--tx-surface-2);
}
.tx-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--tx-border);
    border-radius: 8px;
    background: var(--tx-surface);
    color: var(--tx-text-2) !important;
    font: 600 12.5px var(--tx-font);
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.tx-pill .tx-coin { flex: none; }
.tx-pill:hover { border-color: var(--tx-primary); color: var(--tx-text) !important; }
.tx-pills .tx-pill { border-color: transparent; background: transparent; color: var(--tx-muted) !important; }
.tx-pills .tx-pill:hover { background: var(--tx-surface); color: var(--tx-text) !important; }
.tx-pill.is-active,
.tx-pills .tx-pill.is-active { border-color: var(--tx-primary); background: var(--tx-primary); color: var(--tx-on-primary) !important; box-shadow: 0 2px 8px color-mix(in srgb, var(--tx-primary) 35%, transparent); }
.tx-pills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 0; border: 0; background: none; }
.tx-pills-grid .tx-pill { padding: 10px 12px; border-color: var(--tx-border); background: var(--tx-surface); color: var(--tx-text-2) !important; white-space: normal; }
.tx-pills-grid .tx-pill:hover { border-color: var(--tx-primary); background: var(--tx-surface); }
.tx-pills-grid .tx-pill.is-active { border-color: var(--tx-primary); background: var(--tx-primary-soft); color: var(--tx-primary-text) !important; box-shadow: inset 0 0 0 1px var(--tx-primary); }

.tx-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

/* ---------- Badges ---------- */

.tx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--tx-surface-2);
    color: var(--tx-text-2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.tx-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.tx-badge.is-success { background: var(--tx-success-soft); color: var(--tx-success); }
.tx-badge.is-danger { background: var(--tx-danger-soft); color: var(--tx-danger); }
.tx-badge.is-warning { background: var(--tx-warning-soft); color: var(--tx-warning); }
.tx-badge.is-info { background: var(--tx-info-soft); color: var(--tx-info); }
.tx-badge.is-primary { background: var(--tx-primary-soft); color: var(--tx-primary-text); }
.tx-badge.is-warning::before { animation: tx-blink 1.4s infinite; }

.tx-change {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tx-change.is-up { background: var(--tx-success-soft); color: var(--tx-success); }
.tx-change.is-down { background: var(--tx-danger-soft); color: var(--tx-danger); }

/* ---------- Tables ---------- */

.tx-table-wrap {
    overflow-x: auto;
    margin: 0 -20px -20px;
}

.tx-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.tx-table th {
    padding: 10px 20px;
    border-bottom: 1px solid var(--tx-border);
    color: var(--tx-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.tx-table td {
    padding: 13px 20px;
    border-bottom: 1px solid var(--tx-border);
    color: var(--tx-text-2);
    white-space: nowrap;
}

.tx-table tbody tr { transition: background-color 0.15s ease; }
.tx-table tbody tr:hover { background: var(--tx-surface-2); }
.tx-table tbody tr:last-child td { border-bottom: 0; }
.tx-table .is-right { text-align: right; }

.tx-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 18px;
    color: var(--tx-muted);
    font-size: 13px;
}

/* ---------- Asset list ---------- */

.tx-asset {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tx-asset-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--tx-surface-2);
    font-size: 20px;
}

.tx-asset-icon.is-btc { color: #f7931a; background: rgba(247, 147, 26, 0.12); }
.tx-asset-icon.is-usd { color: var(--tx-success); background: var(--tx-success-soft); }
.tx-asset-icon.is-danger { color: var(--tx-danger); background: var(--tx-danger-soft); }
.tx-asset-name { font-weight: 600; color: var(--tx-text); }
.tx-asset-meta { color: var(--tx-muted); font-size: 12.5px; }

.tx-list { display: flex; flex-direction: column; }
.tx-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--tx-border);
}
.tx-list-item:last-child { border-bottom: 0; padding-bottom: 0; }
.tx-list-item:first-child { padding-top: 0; }

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

.tx-market {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 20px 6px;
    overflow: hidden;
}

.tx-market-price {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    border-radius: 6px;
}

.tx-spark { margin: 0 -20px; min-height: 70px; }

/* ---------- Deposit ---------- */

.tx-address {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px dashed var(--tx-border);
    border-radius: var(--tx-radius-sm);
    background: var(--tx-surface-2);
}

.tx-address code {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--tx-text);
}

.tx-qr {
    padding: 12px;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    background: #fff;
    transition: transform 0.3s var(--tx-ease);
}

.tx-qr:hover { transform: scale(1.03) rotate(-1deg); }

.tx-notice {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--tx-radius-sm);
    background: var(--tx-warning-soft);
    color: var(--tx-text-2);
    font-size: 13px;
}

.tx-notice i { color: var(--tx-warning); font-size: 16px; }
.tx-notice.is-info { background: var(--tx-info-soft); }
.tx-notice.is-info i { color: var(--tx-info); }
.tx-notice.is-danger { background: var(--tx-danger-soft); }
.tx-notice.is-danger i { color: var(--tx-danger); }

/* ---------- Empty, skeleton ---------- */

.tx-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 34px 16px;
    color: var(--tx-muted);
    text-align: center;
}

.tx-empty-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: 16px;
    background: var(--tx-surface-2);
    color: var(--tx-muted);
    font-size: 22px;
    animation: tx-float 4s ease-in-out infinite;
}

.tx-empty h4 { font-size: 15px; }

.tx-skeleton {
    position: relative;
    overflow: hidden;
    border-radius: var(--tx-radius-sm);
    background: var(--tx-surface-2);
}

.tx-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--tx-surface) 70%, transparent), transparent);
    animation: tx-shimmer 1.4s infinite;
}

.tx-chart { position: relative; min-height: 120px; }
.tx-chart > .tx-skeleton { position: absolute; inset: 0; }
.tx-chart.is-ready > .tx-skeleton { opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.tx-chart .apexcharts-canvas, [data-donut] .apexcharts-canvas { background: transparent !important; }

/* ---------- Dropdown, modal, toast ---------- */

.tx-dropdown { position: relative; }

.tx-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    padding: 8px;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    background: var(--tx-surface);
    box-shadow: var(--tx-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.22s var(--tx-ease), visibility 0.18s;
    z-index: 50;
}

.tx-dropdown.is-open .tx-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.tx-menu-head { padding: 10px 10px 12px; border-bottom: 1px solid var(--tx-border); margin-bottom: 6px; }
.tx-menu-head strong { display: block; color: var(--tx-text); }
.tx-menu-head span { color: var(--tx-muted); font-size: 12.5px; }

.tx-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--tx-text-2) !important;
    font: 500 14px var(--tx-font);
    text-align: left;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.tx-menu-item:hover { background: var(--tx-surface-2); color: var(--tx-text) !important; }
.tx-menu-item.is-danger { color: var(--tx-danger) !important; }

.tx-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--tx-brand-grad);
    color: #fff;
    font: 700 14px var(--tx-font);
    cursor: pointer;
    transition: transform 0.15s var(--tx-ease), box-shadow 0.2s ease;
}

.tx-avatar:hover { box-shadow: 0 0 0 4px var(--tx-primary-ring); }
.tx-avatar:active { transform: scale(0.94); }

.tx-notify { min-width: 320px; }
.tx-notify-item { display: flex; gap: 10px; padding: 10px; border-radius: 9px; }
.tx-notify-item:hover { background: var(--tx-surface-2); }
.tx-notify-item p { color: var(--tx-text); font-weight: 500; }
.tx-notify-item span { color: var(--tx-muted); font-size: 12px; }

.tx-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(10, 15, 29, 0.48);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s;
}

.tx-modal.is-open { opacity: 1; visibility: visible; }

.tx-modal-dialog {
    width: 100%;
    max-width: 460px;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-lg);
    background: var(--tx-surface);
    box-shadow: var(--tx-shadow-lg);
    transform: translateY(14px) scale(0.97);
    transition: transform 0.3s var(--tx-ease);
}

.tx-modal.is-open .tx-modal-dialog { transform: none; }
.tx-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 0; }
.tx-modal-head h3 { font-size: 16px; }
.tx-modal-body { padding: 18px 20px 20px; }

.tx-toasts {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(360px, calc(100vw - 36px));
    pointer-events: none;
}

.tx-toast {
    position: relative;
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    overflow: hidden;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius);
    background: var(--tx-surface);
    box-shadow: var(--tx-shadow-lg);
    color: var(--tx-text);
    pointer-events: auto;
    animation: tx-toast-in 0.4s var(--tx-ease);
}

.tx-toast.is-leaving { animation: tx-toast-out 0.3s var(--tx-ease) forwards; }
.tx-toast i { font-size: 18px; color: var(--tx-primary-text); }
.tx-toast.is-success i { color: var(--tx-success); }
.tx-toast.is-danger i { color: var(--tx-danger); }
.tx-toast.is-warning i { color: var(--tx-warning); }
.tx-toast p { font-weight: 500; }

.tx-toast::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.25;
    transform-origin: left;
    animation: tx-progress 4.5s linear forwards;
}

.tx-toast.is-success::after { color: var(--tx-success); }
.tx-toast.is-danger::after { color: var(--tx-danger); }

/* ---------- Auth ---------- */

.tx-auth {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100vh;
}

.tx-auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    overflow: hidden;
    background:
        radial-gradient(70% 60% at 85% 10%, rgba(72, 140, 255, 0.35), transparent 60%),
        radial-gradient(60% 60% at 10% 90%, rgba(127, 176, 255, 0.18), transparent 60%),
        linear-gradient(160deg, #1a3860, #060d19);
    color: #fff;
}

.tx-auth-art .tx-brand { color: #fff !important; padding: 0; }
.tx-auth-art .tx-brand-mark { background: rgba(255, 255, 255, 0.14); box-shadow: none; }
.tx-auth-art h2 { color: #fff; font-size: 36px; line-height: 1.15; letter-spacing: -0.03em; max-width: 440px; }
.tx-auth-art p { margin-top: 14px; color: rgba(255, 255, 255, 0.78); max-width: 420px; font-size: 15px; }

.tx-float-card {
    display: flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    animation: tx-float 6s ease-in-out infinite;
}

.tx-float-card + .tx-float-card { margin-left: 70px; animation-delay: -3s; }
.tx-float-card .cc { font-size: 28px; }
.tx-float-card strong { display: block; font-size: 17px; }
.tx-float-card span { color: rgba(255, 255, 255, 0.75); font-size: 12.5px; }

.tx-auth-form {
    display: grid;
    place-items: center;
    padding: 40px 24px;
}

.tx-auth-box { width: 100%; max-width: 400px; animation: tx-fade-up 0.5s var(--tx-ease); }
.tx-auth-box h1 { font-size: 28px; letter-spacing: -0.03em; }
.tx-auth-box > p { margin: 8px 0 26px; color: var(--tx-muted); }
.tx-auth-foot { margin-top: 22px; color: var(--tx-muted); text-align: center; }

.tx-otp {
    letter-spacing: 0.5em;
    text-align: center;
    font-size: 22px !important;
    font-weight: 700 !important;
}

/* ---------- Settings ---------- */

.tx-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--tx-border);
}

.tx-tab {
    position: relative;
    padding: 10px 14px;
    color: var(--tx-muted) !important;
    font-weight: 600;
    transition: color 0.18s ease;
}

.tx-tab::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: -1px;
    height: 2px;
    border-radius: 2px;
    background: var(--tx-primary);
    transform: scaleX(0);
    transition: transform 0.25s var(--tx-ease);
}

.tx-tab:hover { color: var(--tx-text) !important; }
.tx-tab.is-active { color: var(--tx-primary-text) !important; }
.tx-tab.is-active::after { transform: scaleX(1); }

.tx-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 14px;
    border-radius: var(--tx-radius-sm);
    background: var(--tx-surface-2);
}

/* ---------- Motion ---------- */

.tx-page { animation: tx-fade-up 0.45s var(--tx-ease) both; }
[data-stagger] > * { animation: tx-fade-up 0.45s var(--tx-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

.tx-flash-up { animation: tx-flash-up 1.1s ease; }
.tx-flash-down { animation: tx-flash-down 1.1s ease; }

@keyframes tx-fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tx-slide-down { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes tx-shimmer { to { transform: translateX(100%); } }
@keyframes tx-spin { to { transform: rotate(360deg); } }
@keyframes tx-pop { 0% { transform: scale(0.4); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes tx-blink { 50% { opacity: 0.35; } }
@keyframes tx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes tx-shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes tx-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes tx-toast-in { from { opacity: 0; transform: translateX(24px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes tx-toast-out { to { opacity: 0; transform: translateX(24px) scale(0.96); } }
@keyframes tx-pulse { 0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(5, 150, 105, 0); } 100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); } }
@keyframes tx-flash-up { 0% { background: var(--tx-success-soft); color: var(--tx-success); } 100% { background: transparent; } }
@keyframes tx-flash-down { 0% { background: var(--tx-danger-soft); color: var(--tx-danger); } 100% { background: transparent; } }

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

/* ---------- Responsive ---------- */

@media (max-width: 1280px) {
    .tx-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-grid-main { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1100px) {
    .tx-app { --tx-sidebar: 78px; }
    .tx-sidebar { align-items: center; padding: 20px 12px; }
    .tx-sidebar .tx-brand > span:not(.tx-brand-mark), .tx-nav-link span, .tx-nav-label { display: none; }
    .tx-sidebar .tx-brand { padding: 6px 0 22px; }
    .tx-nav-link { justify-content: center; padding: 11px; }
    .tx-nav-link.is-active::before { left: -12px; }
}

@media (max-width: 900px) {
    .tx-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .tx-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .tx-auth { grid-template-columns: minmax(0, 1fr); }
    .tx-auth-art { display: none; }
}

@media (max-width: 760px) {
    .tx-app { grid-template-columns: minmax(0, 1fr); }
    .tx-sidebar { display: none; }
    .tx-topbar { padding: 12px 16px; }
    .tx-topbar-title { font-size: 17px; }
    .tx-content { padding: 4px 16px 96px; }
    .tx-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .tx-ticker .tx-ticker-change { display: none; }
    .tx-page-head h1 { font-size: 22px; }
    .tx-notify { min-width: 280px; }

    .tx-bottom-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        padding: 6px;
        border: 1px solid var(--tx-border);
        border-radius: 18px;
        background: color-mix(in srgb, var(--tx-surface) 88%, transparent);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        box-shadow: var(--tx-shadow-lg);
    }

    .tx-bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 7px 2px;
        border-radius: 12px;
        color: var(--tx-muted) !important;
        font-size: 11px;
        font-weight: 600;
        transition: color 0.18s ease, background-color 0.18s ease, transform 0.12s var(--tx-ease);
    }

    .tx-bottom-nav a i { font-size: 19px; }
    .tx-bottom-nav a:active { transform: scale(0.92); }
    .tx-bottom-nav a.is-active { color: var(--tx-primary) !important; background: var(--tx-primary-soft); }
}

/* ---------- Marketing pages (template) ---------- */

body.tx-marketing {
    font-family: var(--tx-font);
}

body.tx-marketing h1,
body.tx-marketing h2,
body.tx-marketing h3,
body.tx-marketing h4,
body.tx-marketing h5 {
    font-family: var(--tx-font);
    letter-spacing: -0.02em;
}

body.tx-marketing .btn {
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.12s var(--tx-ease), box-shadow 0.2s ease, background-color 0.2s ease;
}

body.tx-marketing .btn:active { transform: scale(0.97); }

body.tx-marketing .btn-primary {
    background: var(--tx-primary);
    border-color: var(--tx-primary);
    color: var(--tx-on-primary) !important;
    box-shadow: 0 6px 18px var(--tx-primary-ring);
}

body.tx-marketing .btn-primary:hover {
    background: var(--tx-primary-hover);
    border-color: var(--tx-primary-hover);
}

body.tx-marketing .card,
body.tx-marketing .price-widget {
    border-radius: var(--tx-radius);
    transition: transform 0.25s var(--tx-ease), box-shadow 0.25s var(--tx-ease);
}

body.tx-marketing .card:hover,
body.tx-marketing .price-widget:hover {
    transform: translateY(-3px);
    box-shadow: var(--tx-shadow);
}

body.tx-marketing .text-primary { color: var(--tx-primary-text) !important; }

/* ---------- Landing page ---------- */

.tx-landing { background: var(--tx-bg); overflow-x: hidden; }
.tx-l-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

.tx-l-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    background: color-mix(in srgb, var(--tx-bg) 78%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tx-l-nav.is-scrolled { border-bottom-color: var(--tx-border); box-shadow: var(--tx-shadow-sm); }
.tx-l-nav-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.tx-l-nav .tx-brand { padding: 0; }
.tx-l-links { display: flex; gap: 4px; margin-right: auto; }
.tx-l-links a { padding: 8px 12px; border-radius: 10px; color: var(--tx-text-2) !important; font-weight: 500; font-size: 14px; transition: background-color 0.15s ease, color 0.15s ease; }
.tx-l-links a:hover { background: var(--tx-surface-2); color: var(--tx-text) !important; }
.tx-l-nav-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.tx-l-hero { position: relative; padding: 72px 0 24px; text-align: center; }
.tx-l-hero::before {
    content: "";
    position: absolute;
    inset: -120px 0 auto;
    height: 640px;
    background:
        radial-gradient(600px 300px at 50% 20%, var(--tx-primary-soft), transparent 70%),
        radial-gradient(420px 260px at 82% 40%, rgba(247, 147, 26, 0.10), transparent 70%),
        radial-gradient(420px 260px at 18% 50%, var(--tx-success-soft), transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.tx-l-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 6px 8px;
    border: 1px solid var(--tx-border);
    border-radius: 999px;
    background: var(--tx-surface);
    box-shadow: var(--tx-shadow-sm);
    color: var(--tx-text-2);
    font-size: 13px;
    font-weight: 500;
}
.tx-l-eyebrow .tx-badge { padding: 2px 8px; }
.tx-body .tx-l-hero h1 {
    max-width: 860px;
    margin: 22px auto 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    font-weight: 800;
}
.tx-l-gradient {
    background: linear-gradient(120deg, var(--tx-primary-text), #5aa3f5);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.tx-body .tx-l-lead { max-width: 620px; margin: 20px auto 0; color: var(--tx-muted); font-size: 18px; line-height: 1.6; }
.tx-l-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.tx-l-actions .tx-btn { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.tx-l-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; color: var(--tx-muted); font-size: 13px; }
.tx-l-trust i { color: var(--tx-success); margin-right: 6px; }

.tx-l-showcase { position: relative; max-width: 1120px; margin: 56px auto 0; }
.tx-l-frame {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--tx-border);
    border-radius: 18px;
    background: var(--tx-surface);
    box-shadow: 0 40px 80px -24px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.02);
}
.dark-theme .tx-l-frame { box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04); }
.tx-l-frame-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-bottom: 1px solid var(--tx-border); background: var(--tx-surface-2); }
.tx-l-frame-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--tx-border); }
.tx-l-frame-bar span:nth-child(1) { background: #ff5f57; }
.tx-l-frame-bar span:nth-child(2) { background: #febc2e; }
.tx-l-frame-bar span:nth-child(3) { background: #28c840; }
.tx-l-frame-bar em { margin: 0 auto; padding: 3px 14px; border-radius: 8px; background: var(--tx-surface); color: var(--tx-muted); font-size: 12px; font-style: normal; }
.tx-l-frame img { display: block; width: 100%; height: auto; }

.tx-shot-dark { display: none !important; }
.dark-theme .tx-shot-light { display: none !important; }
.dark-theme .tx-shot-dark { display: block !important; }

.tx-l-float {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--tx-border);
    border-radius: 16px;
    background: var(--tx-surface);
    box-shadow: var(--tx-shadow-lg);
    text-align: left;
    animation: tx-float 6s ease-in-out infinite;
}
.tx-l-float strong { display: block; font-size: 15px; }
.tx-l-float small { color: var(--tx-muted); font-size: 12px; }
.tx-l-float.is-left { left: -36px; top: 34%; }
.tx-l-float.is-right { right: -36px; bottom: 14%; animation-delay: -3s; }
.tx-l-float .tx-asset-icon { width: 40px; height: 40px; }

.tx-l-marquee {
    position: relative;
    overflow: hidden;
    margin-top: 64px;
    padding: 18px 0;
    border-block: 1px solid var(--tx-border);
    background: var(--tx-surface);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.tx-l-marquee-track { display: flex; gap: 40px; width: max-content; animation: tx-marquee 48s linear infinite; }
.tx-l-marquee:hover .tx-l-marquee-track { animation-play-state: paused; }
.tx-l-tick { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-weight: 600; }
.tx-l-tick .tx-muted { font-weight: 500; }
@keyframes tx-marquee { to { transform: translateX(-50%); } }

.tx-l-section { padding: 104px 0; }
.tx-l-section.is-tinted { background: var(--tx-surface); border-block: 1px solid var(--tx-border); }
.tx-l-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.tx-l-kicker { color: var(--tx-primary-text); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.tx-body .tx-l-head h2, .tx-body .tx-l-copy h2 { margin-top: 10px; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 800; }
.tx-body .tx-l-head p, .tx-body .tx-l-copy > p { margin-top: 14px; color: var(--tx-muted); font-size: 17px; line-height: 1.6; }

.tx-l-markets { overflow: hidden; }
.tx-l-markets .tx-table-wrap { margin: 0; }
.tx-l-markets .tx-table td { padding-block: 16px; }
.tx-l-markets .tx-spark { width: 150px; min-height: 48px; margin-left: auto; }
.tx-l-rank { width: 28px; color: var(--tx-muted); font-weight: 600; }

.tx-l-feature { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; }
.tx-l-feature + .tx-l-feature { margin-top: 112px; }
.tx-l-feature.is-reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.tx-l-feature.is-reverse .tx-l-copy { order: 2; }
.tx-l-points { display: grid; gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.tx-l-points li { display: flex; gap: 12px; color: var(--tx-text-2); line-height: 1.5; }
.tx-l-points i { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 8px; background: var(--tx-primary-soft); color: var(--tx-primary); font-size: 13px; }
.tx-l-feature .tx-l-frame { transition: transform 0.5s var(--tx-ease), box-shadow 0.5s var(--tx-ease); }
.tx-l-feature .tx-l-frame:hover { transform: translateY(-6px); }

.tx-l-mobile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 64px; align-items: center; }
.tx-l-phones { display: flex; gap: 24px; align-items: flex-end; }
.tx-l-phone {
    width: 260px;
    overflow: hidden;
    border: 10px solid #0f172a;
    border-radius: 42px;
    background: #0f172a;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.45);
}
.tx-l-phone img { display: block; width: 100%; height: auto; border-radius: 32px; }
.tx-l-phone.is-offset { transform: translateY(-36px); }

.tx-l-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.tx-l-step { padding: 28px; }
.tx-l-step-num {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--tx-brand-grad);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 22px var(--tx-primary-ring);
}
.tx-body .tx-l-step h3 { margin-top: 18px; font-size: 18px; }
.tx-body .tx-l-step p { margin-top: 8px; color: var(--tx-muted); line-height: 1.55; }

.tx-l-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.tx-l-grid-4 .tx-card { padding: 26px; }
.tx-l-grid-4 .tx-stat-icon { width: 46px; height: 46px; font-size: 20px; }
.tx-body .tx-l-grid-4 h3 { margin-top: 18px; font-size: 17px; }
.tx-body .tx-l-grid-4 p { margin-top: 8px; color: var(--tx-muted); font-size: 14px; line-height: 1.55; }

.tx-l-cta {
    position: relative;
    overflow: hidden;
    padding: 64px 48px;
    border-radius: 28px;
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(72, 140, 255, 0.4), transparent 60%),
        linear-gradient(135deg, #1a3860, #0b1626);
    color: #fff;
    text-align: center;
    box-shadow: 0 30px 60px -24px rgba(11, 14, 17, 0.55);
}
.tx-l-cta::after {
    content: "";
    position: absolute;
    inset: auto -80px -160px auto;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
}
.tx-body .tx-l-cta h2 { color: #fff; font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.035em; font-weight: 800; }
.tx-body .tx-l-cta p { max-width: 520px; margin: 14px auto 0; color: rgba(255, 255, 255, 0.82); font-size: 17px; }
.tx-l-cta .tx-btn { position: relative; z-index: 1; }
.tx-btn-white { background: #fff; color: #1a3860 !important; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2); }
.tx-btn-white:hover { background: #eef2f7; transform: translateY(-1px); box-shadow: 0 14px 28px rgba(15, 23, 42, 0.25); }
.tx-btn-outline-white { border: 1px solid rgba(255, 255, 255, 0.45); color: #fff !important; background: transparent; }
.tx-btn-outline-white:hover { background: rgba(255, 255, 255, 0.12); }

.tx-l-footer { padding: 48px 0 40px; border-top: 1px solid var(--tx-border); color: var(--tx-muted); font-size: 14px; }
.tx-l-footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.tx-l-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.tx-l-footer a { color: var(--tx-muted) !important; }
.tx-l-footer a:hover { color: var(--tx-text) !important; }

[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--tx-ease), transform 0.7s var(--tx-ease); transition-delay: var(--delay, 0s); }
[data-reveal="tilt"] { transform: perspective(1800px) rotateX(14deg) translateY(40px) scale(0.96); transform-origin: 50% 0; transition-duration: 1s; }
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
    .tx-l-float.is-left { left: 12px; }
    .tx-l-float.is-right { right: 12px; }
    .tx-l-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .tx-l-links { display: none; }
    .tx-l-feature, .tx-l-feature.is-reverse, .tx-l-mobile { grid-template-columns: minmax(0, 1fr); gap: 36px; }
    .tx-l-feature.is-reverse .tx-l-copy { order: 0; }
    .tx-l-steps { grid-template-columns: minmax(0, 1fr); }
    .tx-l-float { display: none; }
    .tx-l-phones { justify-content: center; }
    .tx-l-markets .tx-l-hide-sm { display: none; }
}

@media (max-width: 600px) {
    .tx-l-section { padding: 72px 0; }
    .tx-l-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .tx-l-phone { width: 200px; border-width: 8px; border-radius: 34px; }
    .tx-l-phone img { border-radius: 26px; }
    .tx-l-phone.is-offset { display: none; }
    .tx-l-cta { padding: 48px 24px; }
    .tx-l-nav-actions .tx-l-signin { display: none; }
    .tx-l-markets .tx-spark { width: 90px; }
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
    .tx-l-marquee-track, .tx-l-float { animation: none; }
}

/* ---------- Trade terminal ---------- */

.tx-market-bar {
    display: flex;
    align-items: center;
    gap: 18px 36px;
    flex-wrap: wrap;
    padding: 18px 22px;
}
.tx-market-id { display: flex; align-items: center; gap: 12px; }
.tx-market-id h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.tx-market-id .tx-muted { font-size: 13px; font-weight: 600; }
.tx-market-bar .tx-market-price { display: flex; align-items: center; gap: 10px; padding-right: 36px; border-right: 1px solid var(--tx-border); }
.tx-market-bar .tx-market-price strong { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.tx-market-stats { display: flex; gap: 14px 36px; flex-wrap: wrap; margin: 0; }
.tx-market-stats dt { color: var(--tx-muted); font-size: 12px; font-weight: 500; }
.tx-market-stats dd { margin: 3px 0 0; font-size: 14.5px; font-weight: 600; color: var(--tx-text); }
.tx-market-stats div:last-child { padding-left: 36px; border-left: 1px solid var(--tx-border); }

.tx-trade-grid {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 340px;
    grid-template-areas: "markets chart order";
    gap: 16px;
}
.tx-trade-markets { grid-area: markets; display: flex; flex-direction: column; overflow: hidden; }
.tx-trade-chart { grid-area: chart; min-width: 0; }
.tx-trade-order { grid-area: order; }
.tx-trade-chart > .tx-card, .tx-trade-markets { height: 100%; }

.tx-trade-market-list {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    padding: 0 8px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
}
.tx-trade-market {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 10px;
    color: var(--tx-text) !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease;
}
.tx-trade-market:hover { background: var(--tx-surface-2); }
.tx-trade-market.is-active { background: var(--tx-primary-soft); box-shadow: inset 3px 0 0 var(--tx-primary); }
.tx-trade-market-name, .tx-trade-market-price { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tx-trade-market-price { align-items: flex-end; }
.tx-trade-market strong { font-size: 13.5px; font-weight: 600; }
.tx-trade-market small { color: var(--tx-muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-trade-market small.is-up { color: var(--tx-success); }
.tx-trade-market small.is-down { color: var(--tx-danger); }

.tx-trade-side button { padding: 10px 12px; font-size: 14px; }
.tx-trade-side .is-active.is-buy { background: var(--tx-success); color: #fff !important; }
.tx-trade-side .is-active.is-sell { background: var(--tx-danger); color: #fff !important; }
.tx-trade-type {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--tx-border);
    border-radius: var(--tx-radius-sm);
    font-size: 13px;
    font-weight: 600;
}
.tx-trade-type .tx-muted { font-weight: 500; font-size: 12.5px; }
.tx-trade-percent { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tx-trade-percent button {
    padding: 7px 0;
    border: 1px solid var(--tx-border);
    border-radius: 8px;
    background: transparent;
    color: var(--tx-text-2);
    font: 600 12.5px var(--tx-font);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.tx-trade-percent button:hover { border-color: var(--tx-primary); color: var(--tx-primary-text); background: var(--tx-primary-soft); }
.tx-trade-order .tx-btn-block { min-height: 46px; font-size: 15px; }

@media (max-width: 1440px) {
    .tx-trade-grid { grid-template-columns: 230px minmax(0, 1fr) 320px; }
}
@media (max-width: 1280px) {
    .tx-trade-grid {
        grid-template-columns: minmax(0, 1fr) 340px;
        grid-template-areas: "chart chart" "markets order";
    }
}
@media (max-width: 900px) {
    .tx-market-bar .tx-market-price { padding-right: 0; border-right: 0; }
    .tx-market-stats div:last-child { padding-left: 0; border-left: 0; }
    .tx-trade-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "markets" "chart" "order"; }
    .tx-trade-markets .tx-card-head { display: none; }
    .tx-trade-market-list { flex: none; flex-direction: row; gap: 6px; padding: 8px; overflow-x: auto; overflow-y: hidden; }
    .tx-trade-market { flex: none; grid-template-columns: 22px auto; gap: 8px; padding: 8px 12px; }
    .tx-trade-market .tx-coin { width: 22px; height: 22px; }
    .tx-trade-market-name small, .tx-trade-market-price { display: none; }
    .tx-trade-market.is-active { box-shadow: inset 0 0 0 1px var(--tx-primary); }
}
@media (max-width: 600px) {
    .tx-market-bar { padding: 16px; gap: 14px; }
    .tx-market-bar .tx-market-price strong { font-size: 24px; }
    .tx-market-stats { display: grid; grid-template-columns: repeat(2, 1fr); width: 100%; gap: 12px; }
}

/* ---------- Wallet row actions ---------- */

.tx-row-actions { white-space: nowrap; }
.tx-row-actions .tx-btn + .tx-btn { margin-left: 6px; }
.tx-trade-now { opacity: 0; transform: translateX(8px); pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; }
.tx-table tbody tr:hover .tx-trade-now,
.tx-table tbody tr:focus-within .tx-trade-now { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: none) {
    .tx-trade-now { opacity: 1; transform: none; pointer-events: auto; }
}

/* ---------- Coin price page ---------- */

.tx-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tx-muted); }
.tx-crumbs a { color: var(--tx-text-2); }
.tx-crumbs i { font-size: 11px; }
.tx-market-link { display: block; color: inherit !important; text-decoration: none !important; }
.tx-market-id a { color: var(--tx-primary-text); }
.tx-price-actions { margin-left: auto; gap: 8px; }

.tx-price-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.tx-price-main, .tx-price-side { min-width: 0; }
.tx-price-others { max-height: none; padding: 0; margin: -6px -10px; }

.tx-gauges { display: grid; grid-template-columns: 1fr 1.25fr 1fr; gap: 12px; align-items: end; }
.tx-gauge { text-align: center; padding: 14px 10px 12px; border: 1px solid var(--tx-border); border-radius: var(--tx-radius); background: var(--tx-surface-2); }
.tx-gauge.is-main { background: var(--tx-surface); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tx-primary) 30%, transparent); }
.tx-gauge h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--tx-text-2); }
.tx-gauge.is-main h4 { font-size: 14.5px; color: var(--tx-text); }
.tx-gauge svg { display: block; width: 100%; max-width: 190px; margin: 0 auto; overflow: visible; }
.tx-gauge.is-main svg { max-width: 240px; }
.tx-gauge-arc { fill: none; stroke-width: 13; stroke-linecap: round; }
.tx-gauge-arc.is-strong-sell { stroke: var(--tx-danger); }
.tx-gauge-arc.is-sell { stroke: color-mix(in srgb, var(--tx-danger) 60%, var(--tx-surface-3)); }
.tx-gauge-arc.is-neutral { stroke: color-mix(in srgb, var(--tx-muted) 45%, var(--tx-surface-3)); }
.tx-gauge-arc.is-buy { stroke: color-mix(in srgb, var(--tx-success) 60%, var(--tx-surface-3)); }
.tx-gauge-arc.is-strong-buy { stroke: var(--tx-success); }
.tx-gauge-needle { transform-origin: 100px 100px; transform: rotate(var(--tx-needle)); transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tx-gauge-needle line { stroke: var(--tx-text); stroke-width: 4; stroke-linecap: round; }
.tx-gauge-needle circle { fill: var(--tx-text); }
.tx-gauge-rating { display: block; margin-top: 2px; font-size: 16px; font-weight: 700; }
.tx-gauge.is-main .tx-gauge-rating { font-size: 20px; }
.tx-gauge-rating.is-buy { color: var(--tx-success); }
.tx-gauge-rating.is-sell { color: var(--tx-danger); }
.tx-gauge-rating.is-neutral { color: var(--tx-text-2); }
.tx-gauge-counts { display: flex; justify-content: center; gap: 18px; margin: 8px 0 0; }
.tx-gauge-counts dt { font-size: 11.5px; color: var(--tx-muted); }
.tx-gauge-counts dd { margin: 1px 0 0; font-weight: 700; font-size: 15px; }

.tx-ta-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tx-ta-tables .tx-table-wrap { margin: 0; border: 1px solid var(--tx-border); border-radius: var(--tx-radius-sm); }
.tx-ta-table td, .tx-ta-table th { padding: 9px 14px; font-size: 13px; }
.tx-ta-table th { font-size: 11px; }
.tx-ta-table td:first-child { white-space: normal; }
.tx-ta-note { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--tx-border); }
.tx-signal { display: inline-block; min-width: 58px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: center; }
.tx-signal.is-buy { background: var(--tx-success-soft); color: var(--tx-success); }
.tx-signal.is-sell { background: var(--tx-danger-soft); color: var(--tx-danger); }
.tx-signal.is-neutral { background: var(--tx-surface-2); color: var(--tx-muted); }

.tx-ta-levels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.tx-ta-levels h4 { margin: 0 0 10px; font-size: 14px; font-weight: 600; }
.tx-pivot-label { display: inline-flex; align-items: center; gap: 8px; color: var(--tx-text-2); }
.tx-pivot-label b { display: inline-grid; place-items: center; min-width: 30px; padding: 2px 6px; border-radius: 6px; font-size: 11.5px; }
.tx-pivot-label.is-resistance b { background: var(--tx-danger-soft); color: var(--tx-danger); }
.tx-pivot-label.is-support b { background: var(--tx-success-soft); color: var(--tx-success); }
.tx-pivot-label.is-pivot b { background: var(--tx-primary-soft); color: var(--tx-primary-text); }

.tx-about { margin: 0 0 10px; line-height: 1.65; color: var(--tx-text-2); }
.tx-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 0; }
.tx-facts div { padding: 12px; border-radius: 10px; background: var(--tx-surface-2); }
.tx-facts dt { font-size: 12px; color: var(--tx-muted); }
.tx-facts dd { margin: 4px 0 0; font-size: 13.5px; font-weight: 600; }

.tx-converter-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--tx-border); border-radius: var(--tx-radius-sm); background: var(--tx-surface-2); }
.tx-converter-row span { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.tx-converter-row .tx-input { border: 0; background: transparent; text-align: right; font-size: 16px; font-weight: 600; box-shadow: none; }
.tx-converter-swap { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px auto; position: relative; border: 1px solid var(--tx-border); border-radius: 50%; background: var(--tx-surface); color: var(--tx-muted); }

.tx-range { font-size: 13px; }
.tx-range-bar { position: relative; height: 6px; margin: 8px 0 6px; border-radius: 99px; background: linear-gradient(90deg, var(--tx-danger), var(--tx-warning), var(--tx-success)); }
.tx-range-bar span { position: absolute; top: 50%; width: 14px; height: 14px; border: 3px solid var(--tx-surface); border-radius: 50%; background: var(--tx-text); transform: translate(-50%, -50%); box-shadow: var(--tx-shadow-sm); }

@media (max-width: 1280px) {
    .tx-price-grid { grid-template-columns: minmax(0, 1fr); }
    .tx-price-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .tx-price-side > .tx-card { margin-top: 0; }
}
@media (max-width: 1100px) {
    .tx-ta-tables, .tx-ta-levels { grid-template-columns: minmax(0, 1fr); }
    .tx-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .tx-price-side { grid-template-columns: minmax(0, 1fr); }
    .tx-price-actions { margin-left: 0; width: 100%; }
    .tx-price-actions .tx-btn { flex: 1; }
    .tx-gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-gauge.is-main { grid-column: 1 / -1; order: -1; }
}
.tx-market-pro { margin-left: auto; }

/* ---------- Admin users ---------- */

.tx-admin-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.tx-admin-stats > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--tx-border); border-radius: var(--tx-radius); background: var(--tx-surface); box-shadow: var(--tx-shadow-sm); }
.tx-admin-stats span { color: var(--tx-muted); font-size: 12.5px; }
.tx-admin-stats strong { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.tx-admin-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tx-admin-filters .tx-select { width: auto; min-width: 140px; }
.tx-admin-search { position: relative; flex: 1 1 280px; }
.tx-admin-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--tx-muted); }
.tx-admin-search .tx-input { padding-left: 38px; }
.tx-admin-tabs { display: flex; overflow-x: auto; flex-wrap: nowrap; max-width: 100%; }
.tx-admin-count { margin-left: 4px; padding: 1px 7px; border-radius: 99px; background: color-mix(in srgb, currentColor 14%, transparent); font-size: 11px; }
.tx-coin-stack { display: inline-flex; align-items: center; gap: 2px; }
.tx-warning-text { color: var(--tx-warning); }
.tx-admin-users td { white-space: nowrap; }

@media (max-width: 1100px) {
    .tx-admin-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .tx-admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tx-admin-filters .tx-select { flex: 1 1 140px; }
}
.tx-card-note { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--tx-border); }
.tx-table-wrap + .tx-card-note { margin-top: 20px; }
