/* NXBT Terminal - Account Page Styles */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --accent: #00ff88;
    --accent-dim: rgba(0, 255, 136, 0.15);
    --accent-glow: rgba(0, 255, 136, 0.3);
    --text-primary: #e0e0e0;
    --text-muted: #666;
    --border: #1a1a1a;
}

body {
    background: #000;
    color: var(--accent);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.4;
    min-height: 100vh;
    display: flex;
    padding: 12px;
    gap: 12px;
}

/* Sidebar - Floating Style */
.sidebar {
    width: 200px;
    background: var(--bg-dark);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5),
                0 0 1px rgba(0, 255, 136, 0.2);
    overflow: hidden;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    color: var(--accent);
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 3px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.sidebar-logo .cursor {
    animation: cursorBlink 1s infinite;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.sidebar-sub {
    color: var(--text-muted);
    font-size: 10px;
    margin-top: 6px;
    letter-spacing: 1px;
}

.sidebar-menu {
    flex: 1;
    padding: 12px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.menu-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    color: #000;
    background: var(--accent);
    box-shadow: 0 2px 12px var(--accent-glow);
}

.menu-icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.menu-label {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
}

.sidebar-link {
    color: var(--text-muted);
    font-size: 11px;
    text-decoration: none;
    transition: color 0.2s;
}
.sidebar-link:hover {
    color: var(--accent);
}

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-dark);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-darker);
    border-radius: 16px 16px 0 0;
}

.topbar-title {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 11px;
}

.status-item {
    color: var(--text-muted);
}
.status-item .value {
    color: var(--accent);
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Page Sections */
.page {
    display: none;
}
.page.active {
    display: block;
}

.section {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.section-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    color: var(--text-primary);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

.section-body {
    padding: 16px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-dim);
}

.stat-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: bold;
}

.stat-value.positive { color: var(--accent); }
.stat-value.negative { color: #ff4444; }

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

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

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

td {
    font-size: 12px;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

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

.positive { color: var(--accent); }
.negative { color: #ff4444; }
.muted { color: var(--text-muted); }
.highlight { color: var(--text-primary); }
.warning { color: #ffaa00; }

.loading-text {
    color: #ffaa00;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* Buttons */
.btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 16px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 8px;
    transition: all 0.2s ease;
}
.btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .two-col { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Settings Form */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--accent);
    padding: 10px 12px;
    font-family: inherit;
    font-size: 12px;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-input:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Command Line */
.cmd-line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--bg-darker);
    border-radius: 0 0 16px 16px;
}

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

.cmd-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--accent);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-muted);
}

/* Deposit Page */
.deposit-page-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 20px;
}

.deposit-card {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.deposit-card-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 255, 136, 0.03);
}

.deposit-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.deposit-qr-wrapper {
    padding: 4px;
    background: var(--accent);
    border-radius: 12px;
    box-shadow: 0 0 30px var(--accent-glow);
}

.deposit-qr {
    width: 180px;
    height: 180px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.deposit-qr canvas {
    width: 100% !important;
    height: 100% !important;
}

.qr-placeholder {
    color: #666;
    font-size: 11px;
    text-align: center;
}

.deposit-network-badge {
    display: inline-block;
    background: var(--accent);
    color: #000;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 15px var(--accent-glow);
}

.deposit-address-section {
    width: 100%;
    text-align: center;
}

.deposit-address-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.deposit-address-box-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
}

.deposit-address {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--accent);
    word-break: break-all;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent);
    padding: 4px 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    transition: all 0.2s;
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--accent);
    color: #000;
}

.copy-btn.copied .copy-icon { display: none; }
.copy-btn.copied .copy-done { display: inline !important; }
.copy-btn.copied {
    background: var(--accent);
    color: #000;
}

.deposit-notice {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
}

.notice-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.notice-row:last-child {
    margin-bottom: 0;
}

.notice-label {
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

.notice-row strong {
    color: var(--text-primary);
}

.deposit-history-card {
    background: var(--bg-darker);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.deposit-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.deposit-history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-dark);
    border-radius: 8px;
    font-size: 12px;
}

.deposit-history-item .amount {
    color: var(--accent);
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.deposit-history-item .chain {
    color: var(--text-muted);
    font-size: 10px;
    margin-left: 8px;
}

.deposit-history-item .time {
    color: var(--text-muted);
    font-size: 10px;
}

.deposit-history-item .status {
    font-size: 10px;
    font-weight: bold;
    margin-left: 10px;
}

.deposit-history-item .status.success {
    color: var(--accent);
}

.deposit-history-item .status.pending {
    color: #ffaa00;
}

.deposit-empty {
    color: var(--text-muted);
    font-size: 11px;
    text-align: center;
    padding: 30px;
}

@media (max-width: 900px) {
    .deposit-page-container {
        grid-template-columns: 1fr;
    }
}

.empty-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

/* Sidebar Overlay for Grid Orders */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-panel {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: 420px;
    max-width: calc(100% - 24px);
    background: var(--bg-dark);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: -4px 0 40px rgba(0, 0, 0, 0.6),
                0 0 1px rgba(0, 255, 136, 0.3);
    display: flex;
    flex-direction: column;
    transform: translateX(110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active .sidebar-panel {
    transform: translateX(0);
}

.sidebar-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-darker);
    border-radius: 16px 16px 0 0;
}

.sidebar-panel-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.panel-pair {
    color: var(--accent);
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--accent-glow);
}

.panel-subtitle {
    color: var(--text-muted);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-close {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 6px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-close:hover {
    border-color: #ff4444;
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

/* Grid Stats Summary */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border-bottom: 1px solid var(--border);
}

.grid-stat {
    background: var(--bg-darker);
    padding: 12px 10px;
    text-align: center;
}

.grid-stat .stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.grid-stat .stat-val {
    display: block;
    color: var(--text-primary);
    font-size: 11px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.grid-stat .stat-val.positive { color: var(--accent); }
.grid-stat .stat-val.negative { color: #ff4444; }

/* Sidebar Body */
.sidebar-panel-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Order Book Sections */
.ob-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.ob-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.ob-label {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ob-label.buy { color: var(--accent); }
.ob-label.sell { color: #ff4444; }

.ob-count {
    background: var(--bg-dark);
    color: var(--text-muted);
    font-size: 9px;
    padding: 2px 8px;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
}

.ob-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.ob-loading {
    text-align: center;
    color: #ffaa00;
    font-size: 11px;
    padding: 20px;
    animation: blink 1s infinite;
}

/* Order Row */
.ob-row {
    display: grid;
    grid-template-columns: 28px 1fr 70px 60px;
    align-items: center;
    padding: 6px 16px;
    gap: 8px;
    transition: background 0.15s;
}

.ob-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ob-row .ob-no {
    color: var(--text-muted);
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

.ob-row .ob-bar-wrap {
    position: relative;
    height: 22px;
    background: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
}

.ob-row .ob-bar {
    position: absolute;
    top: 0;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.ob-buy .ob-row .ob-bar {
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.3));
    border-right: 2px solid var(--accent);
}

.ob-sell .ob-row .ob-bar {
    left: 0;
    background: linear-gradient(270deg, transparent, rgba(255, 68, 68, 0.3));
    border-left: 2px solid #ff4444;
}

.ob-row .ob-bar-price {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    z-index: 1;
    padding: 0 8px;
}

.ob-buy .ob-row .ob-bar-price {
    right: 0;
    color: var(--accent);
}

.ob-sell .ob-row .ob-bar-price {
    left: 0;
    color: #ff4444;
}

.ob-row .ob-size {
    text-align: right;
    color: var(--text-primary);
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

.ob-row .ob-pct {
    text-align: right;
    font-size: 10px;
    font-family: 'Courier New', monospace;
}

.ob-row .ob-pct.near { color: var(--accent); }
.ob-row .ob-pct.mid { color: #ffaa00; }
.ob-row .ob-pct.far { color: var(--text-muted); }

/* Current Price Divider */
.ob-current-price {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: var(--bg-darker);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.ob-price-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.ob-price-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
}

.ob-price-label {
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ob-price-value {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Sidebar Footer */
.sidebar-panel-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-darker);
    border-radius: 0 0 16px 16px;
}

.range-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.range-label {
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
}

.range-value {
    color: var(--accent);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

/* Detail button in table */
.btn-detail {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 4px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 10px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-detail:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Empty state */
.ob-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 11px;
    padding: 20px;
}

@media (max-width: 500px) {
    .sidebar-panel {
        width: calc(100% - 24px);
    }

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

    .ob-row {
        grid-template-columns: 24px 1fr 60px 50px;
    }
}

/* Crypto Icons */
.pair-icons {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    vertical-align: middle;
}

.crypto-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-dark);
    border: 1.5px solid var(--border);
    object-fit: contain;
    display: inline-block;
}

.crypto-icon:last-child {
    margin-left: -6px;
    z-index: 1;
}

.crypto-icon:first-child {
    z-index: 2;
}

.crypto-icon-fallback {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-dim), var(--bg-darker));
    border: 1.5px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    font-weight: bold;
    color: var(--accent);
}

.crypto-icon-fallback:last-child {
    margin-left: -6px;
    z-index: 1;
}

.crypto-icon-fallback:first-child {
    z-index: 2;
}

.pair-cell {
    display: flex;
    align-items: center;
}
/* v1767398546 */
