:root {
  --bg-main: #050607;
  --bg-grad-a: rgba(74, 222, 128, 0.08);
  --bg-grad-b: rgba(16, 185, 129, 0.04);

  --panel: rgba(12, 16, 18, 0.72);
  --panel-2: rgba(10, 14, 16, 0.78);
  --panel-solid: #0b0f11;

  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);

  --text: #e7ecef;
  --muted: rgba(231, 236, 239, 0.62);
  --soft: rgba(231, 236, 239, 0.44);

  --accent: #b9ff8a;
  --accent-2: #4ade80;
  --accent-soft: rgba(185, 255, 138, 0.12);

  --negative: #ff5c7c;
  --negative-soft: rgba(255, 92, 124, 0.12);

  --radius: 18px;
  --radius-lg: 22px;

  --shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  --shadow-soft: 0 12px 30px rgba(0, 0, 0, 0.45);

  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Inter",
    sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.theme-dark {
  background: radial-gradient(900px 600px at 55% -10%, var(--bg-grad-a), transparent 55%),
    radial-gradient(900px 700px at 15% 0%, var(--bg-grad-b), transparent 60%),
    linear-gradient(180deg, #050607 0%, #050607 100%);
  color: var(--text);
  font-family: var(--font);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}


.app-shell {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  min-height: 100vh;
  height: auto;
}



.sidebar {
  background: rgba(6, 8, 9, 0.85);
  border-right: 1px solid var(--border);
  padding: 12px 10px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 6px 14px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

.logo-text {
  display: none;
}

.sidebar-section-label {
  display: none;
}

.sidebar-footer {
  font-size: 11px;
  color: var(--soft);
  padding: 8px 6px 2px;
  text-align: center;
}

.sidebar-nav{
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;   
  align-items: center;
  padding: 8px 0;
  overflow: visible;       
  min-height: 0;
}

.sidebar-section{
  margin: 0;
}

.sidebar-section:first-child{
  display: flex;
  flex-direction: column;
  gap: 14px;   
  align-items: center;
}


.sidebar-section:not(:first-child){
  display: none;
}


.sidebar-item{
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid transparent;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.sidebar-item:hover{
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
  transform: translateY(-1px);
}

.sidebar-item.active{
  background: rgba(185,255,138,0.12);
  border-color: rgba(185,255,138,0.18);
}


.sidebar-item img{
  width: 32px;
  height: 32px;
  object-fit: contain;
  opacity: 0.75;
  transform: scale(1.18);
  transition: opacity 0.15s ease, transform 0.12s ease, filter 0.12s ease;
}

.sidebar-item:hover img{
  opacity: 0.95;
  transform: scale(1.28);
}

.sidebar-item.active img{
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(185,255,138,0.65));
}



.main-area {
  display: flex;
  flex-direction: column;
  padding: 14px 18px 16px;
  gap: 12px;
  min-height: 100vh; 
}


.top-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end; 
  gap: 14px;
  padding: 2px 0 10px;
}

.top-search {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 10px 14px;
  flex: 1;
  max-width: 640px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.top-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-icon {
  margin-right: 10px;
  opacity: 0.7;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-utc {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 11px;
  color: var(--soft);
}

#utcClock {
  font-feature-settings: "tnum" on, "lnum" on;
}


.top-balance {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  min-width: 118px;
  align-items: flex-end;
}

.top-balance-label {
  font-size: 10px;
  color: var(--soft);
}

.top-balance-value {
  font-size: 13px;
  font-weight: 700;
  font-feature-settings: "tnum" on, "lnum" on;
}


.news-ticker {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 8px 12px;
  font-size: 11px;
  color: var(--soft);
  backdrop-filter: blur(10px);
}

.news-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  color: rgba(231, 236, 239, 0.45);
}

.news-marquee {
  overflow: hidden;
  flex: 1;
}

.news-items {
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


.btn {
  border-radius: 16px;
  border: 1px solid transparent;
  font-size: 14px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.08s ease, filter 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.btn-small {
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 14px;
}

.btn-connect {
  background: var(--accent);
  color: #07110b;
  box-shadow: 0 16px 40px rgba(185, 255, 138, 0.18);
  border-color: rgba(185, 255, 138, 0.12);
}

.btn-connect:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn-long,
.btn-short {
  flex: 1;
  padding: 12px 18px;
  border-radius: 16px;
}

.btn-long {
  background: var(--accent);
  color: #07110b;
  box-shadow: 0 16px 40px rgba(185, 255, 138, 0.14);
}

.btn-short {
  background: rgba(255, 92, 124, 0.18);
  color: #ffd6de;
  border: 1px solid rgba(255, 92, 124, 0.22);
}

.btn-long:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn-short:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn-connect.connected {
  background: rgba(185, 255, 138, 0.18);
  color: var(--accent);
  border: 1px solid rgba(185, 255, 138, 0.25);
  box-shadow: inset 0 0 0 1px rgba(185, 255, 138, 0.15);
  cursor: default;
}

.btn-connect.connected:hover {
  transform: none;
  filter: none;
}


.asset-main-meta,
.asset-list,
.chart-panel,
.trade-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}


.asset-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.asset-main-meta,
.asset-list {
  padding: 14px 16px;
}

.asset-main-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.asset-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.asset-symbol-pill {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(185, 255, 138, 0.18);
}

.asset-name {
  font-size: 15px;
  font-weight: 600;
  color: rgba(231, 236, 239, 0.92);
}

.asset-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.asset-price {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.asset-change {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(185, 255, 138, 0.12);
  color: var(--accent);
  border: 1px solid rgba(185, 255, 138, 0.15);
}

.asset-change.negative {
  background: var(--negative-soft);
  color: var(--negative);
  border-color: rgba(255, 92, 124, 0.18);
}

.asset-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  font-size: 11px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 14px;
  padding: 10px 10px;
  border: 1px solid var(--border);
}

.meta-label {
  color: var(--soft);
  margin-bottom: 4px;
}

.meta-value {
  font-size: 13px;
  font-weight: 600;
}


.asset-list-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.asset-list-header span:first-child {
  font-size: 14px;
  font-weight: 700;
}

.asset-list-sub {
  font-size: 11px;
  color: var(--soft);
}

.asset-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.asset-table th,
.asset-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.asset-table thead {
  color: rgba(231, 236, 239, 0.42);
  font-weight: 500;
}

.asset-table tbody tr {
  cursor: pointer;
  transition: background 0.12s ease;
}

.asset-table tbody tr:hover,
.asset-table tbody tr.active {
  background: rgba(255, 255, 255, 0.03);
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.3fr);
  gap: 12px;
  min-height: 0;
}

.left-col{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.side-panels{
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}


.chart-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.chart-tabs {
  display: inline-flex;
  gap: 8px;
}

.chart-tab {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.chart-tab:hover {
  border-color: var(--border);
  color: var(--text);
}

.chart-tab.active {
  background: rgba(185, 255, 138, 0.12);
  border-color: rgba(185, 255, 138, 0.18);
  color: var(--accent);
}

.chart-settings {
  display: inline-flex;
  gap: 8px;
}

.chart-setting-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(231, 236, 239, 0.78);
}

.chart-setting-pill.muted {
  opacity: 0.6;
}

.chart-wrapper {
  flex: 1;
  min-height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(2, 8, 8, 0.55);
  border: 1px solid var(--border);
}

#priceChartContainer {
  width: 100%;
  height: 100%;
}


.trade-panel {
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.trade-panel * {
  min-width: 0;
  max-width: 100%;
}

.panel-header {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}


.trade-v2 {
  gap: 10px;
}

.trade-v2-wallet {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
}

.trade-v2-wallet-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 12px;
}

.trade-v2-wallet-row .k {
  color: rgba(231,236,239,0.62);
}

.trade-v2-wallet-row .v {
  font-weight: 800;
  color: rgba(231,236,239,0.92);
  font-feature-settings: "tnum" on, "lnum" on;
}

.trade-v2-box {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-v2-box-label {
  font-size: 12px;
  color: rgba(231,236,239,0.72);
  font-weight: 700;
}

.trade-v2-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.trade-v2-input {
  flex: 1;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  color: rgba(231,236,239,0.92);
  outline: none;
  font-size: 14px;
  font-weight: 800;
}

.trade-v2-input::placeholder {
  color: rgba(231,236,239,0.35);
  font-weight: 700;
}

.trade-v2-input:focus {
  border-color: rgba(185, 255, 138, 0.22);
  box-shadow: 0 0 0 3px rgba(185, 255, 138, 0.08);
}

.trade-v2-chip {
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-weight: 900;
  font-size: 12px;
  color: rgba(231,236,239,0.9);
  user-select: none;
}

.trade-v2-box-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.trade-v2-lev {
  font-size: 13px;
  font-weight: 900;
  color: var(--accent);
  font-feature-settings: "tnum" on, "lnum" on;
}

.trade-v2-range {
  width: 100%;
  accent-color: var(--accent);
}

.trade-v2-range-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(231,236,239,0.55);
  margin-top: -4px;
}

.trade-v2-cta {
  margin-top: 2px;
}

.trade-v2-summary {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trade-v2-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.trade-v2-summary-row .k {
  color: rgba(231,236,239,0.62);
}

.trade-v2-summary-row .v {
  font-weight: 900;
  color: rgba(231,236,239,0.92);
  font-feature-settings: "tnum" on, "lnum" on;
}


.positions-block {
  font-size: 11px;
  margin-top: auto;
}

.positions-header {
  margin-bottom: 8px;
  color: var(--soft);
}

.positions-table {
  width: 100%;
  border-collapse: collapse;
}

.positions-table th,
.positions-table td {
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.positions-table thead {
  color: rgba(231, 236, 239, 0.42);
}

.placeholder-row td {
  text-align: center;
  color: var(--soft);
  padding: 10px 0;
}



.positive { color: var(--accent); }
.negative { color: var(--negative); }



.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  backdrop-filter: blur(8px);
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: rgba(10, 14, 16, 0.9);
  border-radius: var(--radius-lg);
  width: 340px;
  padding: 16px 16px 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 700;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--soft);
  cursor: pointer;
  font-size: 16px;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  margin-bottom: 10px;
  transition: border-color 0.12s ease, transform 0.08s ease;
}

.wallet-option:hover {
  border-color: rgba(185, 255, 138, 0.18);
  transform: translateY(-1px);
}

.wallet-icon img {
  width: 28px;
  height: 28px;
  border-radius: 10px;
}

.wallet-label {
  font-size: 14px;
  font-weight: 700;
}

.wallet-note {
  font-size: 11px;
  color: var(--soft);
  margin-top: 6px;
  line-height: 1.4;
}

.modal-footer {
  margin-top: 10px;
  font-size: 10px;
  color: var(--soft);
  text-align: right;
}


.btn-wallet {
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-dropdown {
  position: absolute;
  right: 0;
  top: 52px;
  width: 380px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(255, 92, 124, 0.12), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(185, 255, 138, 0.06), transparent 55%),
    rgba(10, 14, 16, 0.92);
  box-shadow: 0 22px 70px rgba(0,0,0,0.7);
  backdrop-filter: blur(16px);
  padding: 14px;
  z-index: 70;
}

.wallet-dropdown.hidden {
  display: none;
}

.wallet-dd-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 6px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}

.wallet-dd-title {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
}

.wallet-dd-sub {
  font-size: 11px;
  color: rgba(231,236,239,0.72);
  word-break: break-all;
}

.wallet-dd-section-title {
  font-size: 11px;
  color: rgba(231,236,239,0.62);
  margin: 8px 6px 8px;
}

.wallet-dd-slab {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  background: rgba(255,255,255,0.03);
}

.wallet-dd-deposit {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wallet-dd-deposit-addr {
  flex: 1;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-dd-copy {
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: rgba(231,236,239,0.92);
  cursor: pointer;
  font-weight: 800;
}

.wallet-dd-copy:hover {
  border-color: rgba(185,255,138,0.22);
}

.wallet-dd-note {
  font-size: 11px;
  color: rgba(231,236,239,0.62);
  line-height: 1.35;
}

.wallet-dd-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.wallet-dd-input {
  flex: 1;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
  color: rgba(231,236,239,0.92);
  outline: none;
  font-size: 13px;
}

.wallet-dd-input::placeholder {
  color: rgba(231,236,239,0.35);
}

.wallet-dd-input:focus {
  border-color: rgba(185, 255, 138, 0.22);
  box-shadow: 0 0 0 3px rgba(185, 255, 138, 0.08);
}

.wallet-dd-primary {
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255, 92, 124, 0.18);
  color: #ffd6de;
  font-weight: 900;
  cursor: pointer;
}

.wallet-dd-primary:hover {
  filter: brightness(1.06);
}

.wallet-dd-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wallet-dd-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.wallet-dd-balance-box {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  padding: 10px 12px;
}

.wallet-dd-balance-box .k {
  font-size: 11px;
  color: rgba(231,236,239,0.62);
  margin-bottom: 6px;
}

.wallet-dd-balance-box .v {
  font-size: 16px;
  font-weight: 900;
}

.wallet-dd-actions {
  margin-top: 12px;
}

.wallet-dd-btn {
  width: 100%;
  border-radius: 18px;
  padding: 12px 14px;
  font-weight: 900;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255, 92, 124, 0.16);
  border-color: rgba(255, 92, 124, 0.22);
  color: #ffd6de;
  cursor: pointer;
}

.wallet-dd-btn:hover {
  filter: brightness(1.06);
}


.trade-v2-cta {
  display: flex;
  gap: 10px;
}

.trade-v2-cta .btn-long,
.trade-v2-cta .btn-short {
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
}


.intro-overlay{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 600px at 55% -10%, rgba(74, 222, 128, 0.10), transparent 55%),
    radial-gradient(900px 700px at 15% 0%, rgba(16, 185, 129, 0.06), transparent 60%),
    linear-gradient(180deg, #050607 0%, #050607 100%);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.intro-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  transform: translateY(-6px);
}

.intro-inner::before{
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(185,255,138,0.12),
    transparent 65%
  );
  filter: blur(30px);
  z-index: -1;
}

.intro-logo{
  width: 64px;
  height: 64px;
  border-radius: 0;
  object-fit: cover;
  background: none;
}

.intro-chart{
  position: relative;
  width: 260px;
  height: 90px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.intro-chart svg{
  width: 92%;
  height: auto;
  opacity: 0.95;
}

.intro-line{
  stroke-dasharray: 360;
  stroke-dashoffset: 360;
  animation: intro-draw 1.25s ease forwards;
}

.intro-glow{
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at 60% 30%, rgba(185,255,138,0.14), transparent 55%);
  filter: blur(18px);
  opacity: 0.9;
  animation: intro-pulse 1.1s ease-in-out infinite;
  pointer-events: none;
}

.intro-text{
  font-size: 12px;
  color: rgba(231,236,239,0.72);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

@keyframes intro-draw{
  to { stroke-dashoffset: 0; }
}

@keyframes intro-pulse{
  0%, 100% { transform: scale(1); opacity: 0.75; }
  50% { transform: scale(1.05); opacity: 1; }
}


.app-shell{
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.intro-done .intro-overlay{
  opacity: 0;
  transform: scale(1.01);
  pointer-events: none;
}

.intro-done .app-shell{
  opacity: 1;
  transform: translateY(0);
}


body.theme-dark {
  background: #050607 !important; 
  color: var(--text);
  font-family: var(--font);
}


:root {
  --bg-main: #050607;
}


.positions-block {
  margin-top: 0;      
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.positions-header {
  margin: 0 0 10px;
  color: rgba(231, 236, 239, 0.78);
  font-weight: 800;
  font-size: 13px;
}

.positions-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;         
  font-size: 12px;
}

.positions-table thead th {
  color: rgba(231, 236, 239, 0.45);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.positions-table tbody td {
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}


.positions-table tbody tr,
.positions-table tbody tr:hover {
  background: transparent !important;
}


.positions-table th:last-child,
.positions-table td:last-child {
  text-align: right;
}


.positions-table tbody td:first-child {
  font-weight: 800;
}

.placeholder-row td {
  text-align: center;
  color: rgba(231, 236, 239, 0.55);
  padding: 18px 0;
  border-bottom: none;
}

.positions-table .btn.btn-small {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(231,236,239,0.92);
  font-weight: 800;
  padding: 9px 12px !important;
  border-radius: 14px !important;
  box-shadow: none;
}

.positions-table .btn.btn-small:hover {
  border-color: rgba(185,255,138,0.22);
  background: rgba(185,255,138,0.08);
  color: var(--accent);
  transform: translateY(-1px);
}

.positions-table .btn.btn-small:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}


.positions-table td:last-child > div {
  margin-top: 6px !important;
  font-size: 10px !important;
  color: rgba(231,236,239,0.55) !important;
}


.positions-table td:last-child {
  text-align: right;
  white-space: nowrap;
}

.positions-table .btn.btn-small {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;

  width: auto !important;         
  min-width: 0 !important;
  padding: 6px 10px !important;   
  font-size: 12px !important;
  border-radius: 12px !important;

  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(231,236,239,0.92);
  font-weight: 700;
  box-shadow: none;
}

.positions-table .btn.btn-small:hover {
  border-color: rgba(185,255,138,0.22);
  background: rgba(185,255,138,0.08);
  color: var(--accent);
  transform: translateY(-1px);
}

.positions-pagination{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:10px;
}

.positions-page{
  font-size:11px;
  color: rgba(231,236,239,0.62);
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 100vh;
  align-self: stretch;
}


.sidebar-nav {
  flex: 1 1 auto;
}


.sidebar-footer {
  margin-top: auto;
  padding: 12px 10px 14px;
  display: flex;
  justify-content: center;
}

.sidebar-x-btn {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(10px);

  transition: background 0.15s ease, border-color 0.15s ease, transform 0.08s ease;
}

.sidebar-x-btn:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
  transform: translateY(-1px);
}

.sidebar-x-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.9;
}

.top-right {
  display: flex;
  align-items: center;
  gap: 14px;
}


html, body {
  height: 100%;
  overflow: hidden;
}


.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}


.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 88px;
  z-index: 30;
}

.main-area {
  margin-left: 88px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  flex-shrink: 0;
}


.main-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 16px;
}


.side-panels,
.trade-panel,
.left-col {
  overflow: visible;
}

.main-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(185,255,138,0.28) transparent;
}

.main-scroll::-webkit-scrollbar {
  width: 7px;
}

.main-scroll::-webkit-scrollbar-thumb {
  background: rgba(185,255,138,0.22);
  border-radius: 6px;
}

.main-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(185,255,138,0.4);
}


.news-ticker {
  margin-bottom: 10px;
}


.asset-strip {
  margin-bottom: 12px;
}


.main-grid {
  gap: 12px;
}


.chart-panel {
  margin-bottom: 12px;
}


.positions-block {
  margin-top: 12px;
}


.trade-panel {
  margin-top: 4px;
}

.chart-panel,
.trade-panel,
.positions-block,
.asset-strip,
.asset-list {
  padding: 14px;
}

.chart-panel,
.trade-panel,
.positions-block,
.asset-strip,
.asset-list {
  border-radius: 14px;
}

.chart-panel::after,
.trade-panel::after,
.positions-block::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  opacity: 0.04;
}

.mobile-only {
  display: none;
}

@media (max-width: 900px) {
  .app-shell {
    display: none !important;
  }

  .mobile-only {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 22px;
    background: #050607;
    color: rgba(231,236,239,0.92);
    font-family: var(--font);
  }

  .mobile-card {
    width: 100%;
    max-width: 420px;
    border-radius: 22px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(12, 16, 18, 0.78);
    box-shadow: 0 18px 60px rgba(0,0,0,0.6);
    backdrop-filter: blur(14px);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: center;
  }

  .mobile-logo {
    width: 64px;
    height: 64px;
    margin: 4px auto 2px;
    object-fit: contain;
  }

  .mobile-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.01em;
  }

  .mobile-sub {
    font-size: 13px;
    color: rgba(231,236,239,0.68);
    line-height: 1.45;
  }

  .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
  }

  .mobile-btn {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: rgba(231,236,239,0.92);
    font-weight: 900;
    cursor: pointer;
  }

  .mobile-btn.primary {
    background: rgba(185,255,138,0.16);
    border-color: rgba(185,255,138,0.22);
    color: #d8ffbf;
  }

  .mobile-note {
    margin-top: 4px;
    font-size: 11px;
    color: rgba(231,236,239,0.55);
  }
}