/* ============================================================
RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #F5F6F8; color: #182C49; font-size: 14px; min-height: 100vh; }

/* ============================================================
NAVIGATION
============================================================ */
nav {
background: #fff;
border-bottom: 1px solid #E5E7EB;
height: 64px;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
position: sticky;
top: 0;
z-index: 100;
box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.nav-logo { display: flex; align-items: center; cursor: pointer; }
.nav-links { display: flex; gap: 28px; font-size: 13px; color: #46526D; }
.nav-links span { cursor: pointer; padding: 4px 2px; transition: color 0.15s; border-bottom: 2px solid transparent; }
.nav-links span:hover { color: #295EBC; }
.nav-links span.active-link { color: #295EBC; border-bottom-color: #295EBC; }
.badge-new { background: #DCE6FF; color: #295EBC; font-size: 9px; font-weight: 800; padding: 2px 5px; border-radius: 3px; margin-left: 4px; letter-spacing: 0.04em; vertical-align: middle; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.nav-right span { font-size: 13px; color: #46526D; cursor: pointer; transition: color 0.15s; }
.nav-right span:hover { color: #295EBC; }
.nav-pill { background: #202737; color: #fff; padding: 7px 16px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }

/* ============================================================
PAGES
============================================================ */
.page { display: none; max-width: 1280px; margin: 0 auto; padding: 28px 24px; }
.page.active { display: block; }

.card { background: #fff; border-radius: 12px; border: 1px solid #E5E7EB; }
.card-padded { padding: 24px; }

/* ============================================================
DASHBOARD PAGE
============================================================ */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dash-col { display: flex; flex-direction: column; gap: 20px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 18px; color: #182C49; text-align: center; }

.user-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; padding: 14px 16px; background: #F5F6F8; border-radius: 8px; border: 1px solid #E5E7EB; }
.user-info h3 { font-size: 15px; font-weight: 700; margin-bottom: 2px; color: #182C49; }
.user-info p { font-size: 12px; color: #8693A3; }
.kyc-badge { background: #E6F9ED; color: #077E38; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

.portfolio-label { font-size: 12px; color: #8693A3; margin-bottom: 4px; }
.portfolio-value { font-size: 28px; font-weight: 700; color: #182C49; margin-bottom: 18px; }
.portfolio-currency { font-size: 13px; color: #8693A3; margin-left: 4px; font-weight: 500; }

.chart-row { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.pie { width: 110px; height: 110px; border-radius: 50%; background: conic-gradient(#295EBC 0% 42%, #F59E0B 42% 61%, #34a643 61% 75%, #8B5CF6 75% 84%, #8693A3 84% 100%); flex-shrink: 0; }
.legend { display: flex; flex-direction: column; gap: 7px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #46526D; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.action-row { display: flex; gap: 10px; }
.btn-primary { background: #295EBC; color: #fff; border: none; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; transition: background 0.15s; }
.btn-primary:hover { background: #4a7ddd; }
.btn-outline { background: #fff; color: #295EBC; border: 1.5px solid #295EBC; padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; flex: 1; transition: all 0.15s; }
.btn-outline:hover { background: #DCE6FF; }

/* Notifications */
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #F5F6F8; }
.notif-item:last-child { border-bottom: none; }
.notif-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-icon.blue { background: #DCE6FF; }
.notif-icon.green { background: #E6F9ED; }
.notif-icon.amber { background: #FEF3C7; }
.notif-title { font-size: 13px; font-weight: 600; color: #182C49; margin-bottom: 2px; }
.notif-desc { font-size: 12px; color: #8693A3; line-height: 1.4; }
.notif-time { font-size: 11px; color: #99A1AF; margin-left: auto; flex-shrink: 0; padding-top: 2px; }
.unread-dot { width: 7px; height: 7px; background: #295EBC; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }

/* Security */
.security-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid #F5F6F8; }
.security-row:last-child { border-bottom: none; }
.security-label { font-size: 13px; font-weight: 500; color: #182C49; }
.security-desc { font-size: 12px; color: #8693A3; margin-top: 2px; }
.status-on { background: #E6F9ED; color: #077E38; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.btn-sm { padding: 6px 13px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; border: none; transition: opacity 0.15s; }
.btn-sm:hover { opacity: 0.8; }
.btn-sm.green { background: #E6F9ED; color: #077E38; }
.btn-sm.blue { background: #DCE6FF; color: #295EBC; }

/* API table */
.inner-table { width: 100%; border-collapse: collapse; }
.inner-table th { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #8693A3; letter-spacing: 0.05em; text-align: left; padding: 8px 10px; border-bottom: 1.5px solid #E5E7EB; }
.inner-table td { padding: 11px 10px; font-size: 13px; border-bottom: 1px solid #F5F6F8; color: #182C49; }
.inner-table tr:last-child td { border-bottom: none; }
.status-active { background: #E6F9ED; color: #077E38; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; }

/* Sign-in history */
.signin-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #F5F6F8; font-size: 12px; color: #46526D; }
.signin-item:last-child { border-bottom: none; }
.signin-device { display: flex; align-items: center; gap: 8px; font-weight: 500; color: #182C49; }

/* ============================================================
WALLETS BALANCES PAGE
============================================================ */
.filter-bar { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid #E5E7EB; }
.filter-bar h1 { font-size: 20px; font-weight: 700; color: #182C49; }
.search-box { display: flex; align-items: center; gap: 8px; background: #F5F6F8; border: 1px solid #E5E7EB; border-radius: 8px; padding: 8px 14px; width: 240px; }
.search-box input { border: none; background: transparent; font-size: 13px; outline: none; width: 100%; color: #46526D; }
.table-subheader { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #E5E7EB; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #46526D; cursor: pointer; }
.checkbox-label input { width: 14px; height: 14px; }
.portfolio-total { font-size: 13px; color: #8693A3; }
.portfolio-total strong { color: #182C49; font-weight: 700; }

table.main-table { width: 100%; border-collapse: collapse; }
table.main-table thead th { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #99A1AF; letter-spacing: 0.05em; text-align: left; padding: 12px 20px; border-bottom: 1px solid #E5E7EB; }
table.main-table thead th.right { text-align: right; }
table.main-table tbody tr { border-bottom: 1px solid #F5F6F8; transition: background 0.12s; }
table.main-table tbody tr:last-child { border-bottom: none; }
table.main-table tbody tr:hover { background: #FAFBFC; }
table.main-table tbody td { padding: 14px 20px; font-size: 13px; }
table.main-table tbody td.right { text-align: right; }

.currency-cell { display: flex; align-items: center; gap: 10px; }
.currency-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }
.currency-name { font-weight: 600; font-size: 13px; color: #182C49; }
.currency-full { font-size: 11px; color: #99A1AF; margin-top: 1px; }
.amount { font-weight: 600; color: #182C49; }
.value-sub { color: #8693A3; font-size: 12px; margin-top: 1px; }
.actions { display: flex; gap: 6px; justify-content: flex-end; }
.btn-xs { padding: 5px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all 0.15s; }
.btn-xs.blue { background: #295EBC; color: #fff; }
.btn-xs.blue:hover { background: #4a7ddd; }
.btn-xs.outline { background: #fff; color: #295EBC; border: 1.5px solid #295EBC; }
.btn-xs.outline:hover { background: #DCE6FF; }
.btn-xs.ghost { background: #F5F6F8; color: #46526D; }
.btn-xs.ghost:hover { background: #EDEEF2; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px; border-top: 1px solid #E5E7EB; }
.pg-btn { padding: 6px 14px; border-radius: 6px; border: 1px solid #E5E7EB; background: #fff; cursor: pointer; font-size: 12px; color: #46526D; transition: all 0.15s; }
.pg-btn:hover { background: #F5F6F8; }
.pg-btn.active { background: #295EBC; color: #fff; border-color: #295EBC; }

/* ============================================================
DEPOSITS PAGE
============================================================ */
.deposits-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; }
.page-tabs { display: flex; border-bottom: 2px solid #E5E7EB; }
.tab { padding: 14px 22px; font-size: 13px; font-weight: 600; color: #8693A3; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.15s; }
.tab:hover { color: #295EBC; }
.tab.active { color: #295EBC; border-bottom-color: #295EBC; }
.panel-title { font-size: 16px; font-weight: 700; padding: 18px 20px 14px; border-bottom: 1px solid #E5E7EB; color: #182C49; }
.selector-section { padding: 14px 20px; border-bottom: 1px solid #E5E7EB; }
.selector-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #99A1AF; letter-spacing: 0.05em; margin-bottom: 8px; }
.selector-box { display: flex; align-items: center; gap: 10px; border: 1.5px solid #E5E7EB; border-radius: 8px; padding: 10px 14px; cursor: pointer; background: #F5F6F8; transition: border-color 0.15s; }
.selector-box:hover { border-color: #295EBC; }
.sel-icon { width: 28px; height: 28px; border-radius: 50%; background: #FEF3C7; color: #92400E; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; }
.sel-name { font-weight: 600; font-size: 14px; color: #182C49; }
.sel-full { font-size: 11px; color: #99A1AF; }
.sel-chevron { margin-left: auto; color: #99A1AF; font-size: 11px; }
.network-option { display: flex; align-items: center; gap: 10px; border: 1.5px solid #295EBC; border-radius: 8px; padding: 10px 14px; background: #EEF4FF; cursor: pointer; }
.network-dot { width: 8px; height: 8px; border-radius: 50%; background: #295EBC; flex-shrink: 0; }
.network-name { font-weight: 600; font-size: 13px; color: #295EBC; }
.network-desc { font-size: 11px; color: #8693A3; margin-top: 1px; }
.address-section { padding: 20px; }
.qr-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.addr-label { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #99A1AF; letter-spacing: 0.05em; margin-bottom: 6px; }
.addr-box { display: flex; align-items: center; gap: 8px; background: #F5F6F8; border: 1px solid #E5E7EB; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.addr-text { font-size: 11px; font-family: monospace; color: #46526D; flex: 1; word-break: break-all; }
.copy-btn { background: #295EBC; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.copy-btn:hover { background: #4a7ddd; }
.warning-box { background: #FFFBEB; border: 1px solid #FCD34D; border-radius: 8px; padding: 12px 14px; font-size: 12px; color: #92400E; line-height: 1.5; }
.warning-box strong { font-weight: 700; }

/* History table inside deposits */
.history-header { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 14px; border-bottom: 1px solid #E5E7EB; }
.history-title { font-size: 16px; font-weight: 700; color: #182C49; }
.filter-chips { display: flex; gap: 6px; }
.chip { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1.5px solid #E5E7EB; background: #fff; color: #8693A3; cursor: pointer; transition: all 0.15s; }
.chip:hover { border-color: #295EBC; color: #295EBC; }
.chip.active { background: #295EBC; color: #fff; border-color: #295EBC; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-pill.completed { background: #E6F9ED; color: #077E38; }
.status-pill.pending { background: #FEF3C7; color: #92400E; }
.status-pill.processing { background: #DCE6FF; color: #295EBC; }
.txid { font-family: monospace; font-size: 11px; color: #8693A3; }
.amt-main { font-weight: 600; color: #182C49; }
.amt-sub { font-size: 11px; color: #99A1AF; margin-top: 1px; }

/* ============================================================
TOAST
============================================================ */
#toast {
position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(80px);
background: #202737; color: #fff; padding: 12px 20px; border-radius: 8px;
font-size: 13px; font-weight: 500; z-index: 9999; transition: transform 0.3s ease;
box-shadow: 0 8px 24px rgba(0,0,0,0.2); pointer-events: none;
}
#toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================================
MODAL
============================================================ */
.modal-overlay {
display: none; position: fixed; inset: 0;
background: rgba(10, 27, 52, 0.55); z-index: 500;
align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 460px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-title { font-size: 18px; font-weight: 700; color: #182C49; }
.modal-close { background: none; border: none; font-size: 20px; color: #8693A3; cursor: pointer; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { background: #F5F6F8; }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12px; font-weight: 600; color: #46526D; margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: 0.03em; }
.form-input { width: 100%; border: 1.5px solid #E5E7EB; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #182C49; outline: none; transition: border-color 0.15s; background: #fff; }
.form-input:focus { border-color: #295EBC; }
.form-select { width: 100%; border: 1.5px solid #E5E7EB; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #182C49; outline: none; background: #fff; cursor: pointer; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-note { font-size: 12px; color: #8693A3; margin-top: 12px; line-height: 1.5; background: #F5F6F8; border-radius: 8px; padding: 10px 12px; }

/* ============================================================
GUIDED TOUR
============================================================ */
#tour-bar {
position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
background: #202737; color: #fff;
display: flex; align-items: center; justify-content: space-between;
padding: 14px 32px; gap: 16px;
transform: translateY(100%); transition: transform 0.3s ease;
box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
#tour-bar.open { transform: translateY(0); }
.tour-step-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: #8693A3; margin-bottom: 3px; }
.tour-step-text { font-size: 14px; font-weight: 500; color: #fff; line-height: 1.4; }
.tour-controls { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.tour-btn { padding: 8px 18px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; border: none; transition: all 0.15s; }
.tour-btn.next { background: #295EBC; color: #fff; }
.tour-btn.next:hover { background: #4a7ddd; }
.tour-btn.skip { background: transparent; color: #8693A3; border: 1px solid #46526D; }
.tour-btn.skip:hover { color: #fff; border-color: #fff; }
.tour-progress { font-size: 12px; color: #8693A3; }

/* Spotlight highlight */
.tour-highlight {
outline: 3px solid #295EBC !important;
outline-offset: 3px !important;
border-radius: 8px;
position: relative;
z-index: 200;
}

/* Start tour floating button */
#tour-start-btn {
position: fixed; bottom: 24px; right: 24px; z-index: 300;
background: #295EBC; color: #fff;
border: none; border-radius: 50px;
padding: 12px 20px; font-size: 13px; font-weight: 700;
cursor: pointer; box-shadow: 0 4px 16px rgba(41,94,188,0.45);
display: flex; align-items: center; gap: 8px;
transition: all 0.2s;
}
#tour-start-btn:hover { background: #4a7ddd; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(41,94,188,0.5); }
#tour-start-btn.hidden { display: none; }

/* GATE */
#gate{position:fixed;inset:0;background:#0F1B2D;z-index:10000;display:flex;align-items:center;justify-content:center}
.gate-box{background:#fff;border-radius:16px;padding:44px 40px;width:380px;text-align:center;box-shadow:0 24px 80px rgba(0,0,0,.5)}
.gate-title{font-size:20px;font-weight:700;color:#182C49;margin-bottom:6px}
.gate-sub{font-size:13px;color:#8693A3;margin-bottom:24px;line-height:1.5}
.gate-input{width:100%;border:1.5px solid #E5E7EB;border-radius:8px;padding:11px 14px;font-size:15px;color:#182C49;outline:none;text-align:center;letter-spacing:.05em;margin-bottom:12px;transition:border-color .15s}
.gate-input:focus{border-color:#295EBC}
.gate-btn{width:100%;background:#295EBC;color:#fff;border:none;border-radius:8px;padding:12px;font-size:15px;font-weight:700;cursor:pointer}
.gate-btn:hover{background:#4a7ddd}
.gate-err{color:#DC2626;font-size:12px;margin-top:6px;display:none}
/* BANNER */
#demo-banner{background:#202737;color:#fff;padding:9px 24px;display:flex;align-items:center;justify-content:center;gap:10px;font-size:12px;font-weight:500;position:sticky;top:0;z-index:99}
#demo-banner .bd{width:7px;height:7px;background:#F59E0B;border-radius:50%;flex-shrink:0}
nav{top:34px}
/* SUB-NAV */
.sub-nav{background:#fff;border-bottom:1px solid #E5E7EB;display:none;align-items:center;gap:4px;padding:0 28px;height:44px;position:sticky;top:98px;z-index:90}
.stab{padding:6px 14px;border-radius:6px;font-size:13px;font-weight:500;color:#46526D;cursor:pointer;transition:all .15s;white-space:nowrap}
.stab:hover{color:#295EBC;background:#EEF4FF}
.stab.on{color:#295EBC;background:#DCE6FF;font-weight:700}
/* PAGE COMMON */
.page-header{margin-bottom:24px}
.page-header h1{font-size:22px;font-weight:700;color:#182C49}
.page-header p{font-size:13px;color:#8693A3;margin-top:4px}
.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.three-col{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px}
.stat-card{background:#fff;border:1px solid #E5E7EB;border-radius:12px;padding:20px 24px}
.stat-label{font-size:12px;color:#8693A3;font-weight:500;margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.stat-value{font-size:24px;font-weight:700;color:#182C49}
.stat-sub{font-size:12px;color:#8693A3;margin-top:4px}
.info-row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid #F5F6F8}
.info-row:last-child{border-bottom:none}
.info-label{font-size:13px;color:#46526D}
.info-value{font-size:13px;font-weight:600;color:#182C49}
.step-row{display:flex;align-items:flex-start;gap:16px;padding:16px 0;border-bottom:1px solid #F5F6F8}
.step-row:last-child{border-bottom:none}
.step-num{width:28px;height:28px;border-radius:50%;background:#295EBC;color:#fff;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;margin-top:1px}
.step-num.done{background:#077E38}
.step-content h3{font-size:14px;font-weight:600;color:#182C49;margin-bottom:3px}
.step-content p{font-size:12px;color:#8693A3;line-height:1.5}
.rate-row{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;border-bottom:1px solid #F5F6F8}
.rate-row:last-child{border-bottom:none}
.rate-pair{font-size:15px;font-weight:700;color:#182C49}
.rate-sub{font-size:11px;color:#8693A3;margin-top:2px}
.rate-value{font-size:16px;font-weight:700;color:#182C49;text-align:right}
.rate-change{font-size:11px;color:#077E38}
.interest-card{background:#fff;border:1px solid #E5E7EB;border-radius:12px;overflow:hidden}
.interest-header{background:linear-gradient(135deg,#295EBC,#4a7ddd);padding:20px 24px;color:#fff}
.interest-header h2{font-size:18px;font-weight:700;margin-bottom:4px}
.interest-apy{font-size:32px;font-weight:800;margin:8px 0 4px}
.interest-body{padding:20px 24px}
.client-info h4{font-size:13px;font-weight:600;color:#182C49;margin-bottom:2px}
.client-info p{font-size:11px;color:#8693A3}
.kyc-level{display:inline-flex;align-items:center;gap:4px;padding:3px 10px;border-radius:20px;font-size:11px;font-weight:600;background:#E6F9ED;color:#077E38}
.kyc-level.pending{background:#FEF3C7;color:#92400E}
