/* ==========================================================================
   GXINIT - MODERN FINANCIAL TRADING CHART DASHBOARD STYLESHEET
   ========================================================================== */

:root {
  --bg-dark: #090c10;
  --bg-panel: rgba(18, 22, 33, 0.85);
  --bg-card: rgba(25, 31, 46, 0.6);
  --bg-hover: rgba(255, 255, 255, 0.05);
  --bg-active: rgba(0, 242, 254, 0.12);

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 242, 254, 0.5);

  --text-main: #f0f4f8;
  --text-muted: #8492a6;
  --text-subtle: #4c586e;

  --color-green: #00e676;
  --color-green-glow: rgba(0, 230, 118, 0.25);
  --color-red: #ff3b69;
  --color-red-glow: rgba(255, 59, 105, 0.25);
  --color-primary: #00f2fe;
  --color-primary-dark: #4facfe;

  --font-ui: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-glow: 0 0 20px rgba(0, 242, 254, 0.15);
}

/* RESET & BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.dark-theme {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-ui);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* UTILITY CLASSES */
.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }
.text-muted { color: var(--text-muted) !important; }
.hidden { display: none !important; }
.mt-12 { margin-top: 12px; }

/* TOP NAVBAR */
.navbar {
  height: 60px;
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-logo {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #090c10;
  font-size: 1.2rem;
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #ffffff, var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 1.5px;
}

/* Symbol Selector Dropdown */
.symbol-selector-wrap {
  position: relative;
}

.symbol-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.symbol-btn:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.symbol-icon {
  color: var(--color-primary);
}

.symbol-type-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.symbol-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  background: rgba(18, 22, 33, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 200;
}

.menu-search {
  position: relative;
  margin-bottom: 10px;
}
.menu-search i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
}
.menu-search input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 10px 8px 32px;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}
.menu-search input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.menu-categories {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.cat-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}
.cat-btn.active {
  background: var(--color-primary);
  color: #090c10;
  font-weight: 700;
}

.symbol-list {
  max-height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.symbol-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}
.symbol-item:hover {
  background: var(--bg-hover);
}
.symbol-item-name {
  font-weight: 600;
  font-size: 0.9rem;
}
.symbol-item-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.symbol-item-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: right;
}

/* Header Ticker Stats Bar */
.header-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  border-left: 1px solid var(--border-color);
  padding-left: 20px;
}
.stat-item {
  display: flex;
  flex-direction: column;
}
.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Right Nav Controls */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 230, 118, 0.1);
  border: 1px solid rgba(0, 230, 118, 0.3);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-green);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green);
}
.status-dot.pulsing {
  box-shadow: 0 0 8px var(--color-green);
  animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
.icon-btn:hover {
  color: var(--text-main);
  border-color: var(--color-primary);
}
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--color-red);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #090c10;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-outline:hover {
  border-color: var(--color-primary);
  background: var(--bg-hover);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-block {
  width: 100%;
}
.btn-lg {
  padding: 12px;
  font-size: 1rem;
}

.btn-buy {
  background: linear-gradient(135deg, #00e676, #00b0ff);
  color: #090c10;
  font-weight: 700;
}
.btn-buy:hover {
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}
.btn-sell {
  background: linear-gradient(135deg, #ff3b69, #ff1744);
  color: #ffffff;
  font-weight: 700;
}
.btn-sell:hover {
  box-shadow: 0 0 20px rgba(255, 59, 105, 0.4);
}

/* MAIN DASHBOARD LAYOUT GRID */
.dashboard-container {
  display: grid;
  grid-template-columns: 260px 1fr 300px;
  flex: 1;
  height: calc(100vh - 60px);
  overflow: hidden;
  background: var(--bg-dark);
}

/* LEFT SIDEBAR */
.sidebar-left {
  background: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.sidebar-header h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-subtle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}
.icon-subtle:hover {
  color: var(--text-main);
}

.watchlist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.wl-item:hover, .wl-item.active {
  border-color: var(--color-primary);
  background: var(--bg-active);
}
.wl-symbol {
  font-weight: 700;
  font-size: 0.9rem;
}
.wl-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.wl-right {
  text-align: right;
}
.wl-price {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}
.wl-change {
  font-size: 0.72rem;
  font-weight: 600;
}

/* AI Signal Card */
.ai-signal-card {
  background: linear-gradient(145deg, rgba(0, 242, 254, 0.05), rgba(25, 31, 46, 0.8));
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.ai-signal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}
.badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
}
.badge-bullish {
  background: rgba(0, 230, 118, 0.2);
  color: var(--color-green);
  border: 1px solid var(--color-green);
}
.ai-score-bar-wrap {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}
.ai-score-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-green));
  border-radius: 3px;
  transition: width 0.4s ease;
}
.ai-details {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  font-size: 0.7rem;
}
.ai-stat span {
  color: var(--text-muted);
  display: block;
}
.ai-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* MAIN CHART SECTION */
.main-chart-section {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: var(--bg-dark);
  height: 100%;
  overflow: hidden;
}

/* Chart Toolbar */
.chart-toolbar {
  height: 44px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  overflow-x: auto;
}
.toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.tf-selector {
  display: flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.3);
  padding: 2px;
  border-radius: var(--radius-sm);
}
.tf-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 0.75rem;
  font-family: var(--font-ui);
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
}
.tf-btn.active, .tf-btn:hover {
  background: var(--bg-card);
  color: var(--color-primary);
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-color);
}

.tool-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.tool-btn.active, .tool-btn:hover {
  color: var(--color-primary);
  background: var(--bg-card);
  border-color: var(--border-color);
}

.tool-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.tool-chip.active {
  background: rgba(0, 242, 254, 0.1);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.toolbar-right {
  margin-left: auto;
}

/* CHART CANVAS CONTAINER */
.chart-canvas-container {
  flex: 1;
  position: relative;
  background: radial-gradient(circle at 50% 50%, rgba(20, 26, 40, 0.4) 0%, rgba(9, 12, 16, 1) 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#mainChartCanvas {
  width: 100%;
  flex: 3;
  cursor: crosshair;
}

#subChartCanvas {
  width: 100%;
  flex: 1;
  border-top: 1px solid var(--border-color);
  cursor: crosshair;
}

/* Tooltip overlay */
.chart-tooltip {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(18, 22, 33, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  pointer-events: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  z-index: 10;
}
.tooltip-time {
  color: var(--color-primary);
  margin-bottom: 4px;
  font-weight: 700;
}
.tooltip-grid {
  display: flex;
  gap: 12px;
  color: var(--text-muted);
}
.tooltip-grid span {
  color: var(--text-main);
}

/* BOTTOM PANEL */
.bottom-panel {
  height: 200px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.bottom-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
}
.panel-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.panel-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: var(--bg-card);
}

.bottom-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}
.tab-pane {
  height: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 8px;
}
.empty-state i {
  font-size: 1.8rem;
}

/* RIGHT SIDEBAR (ORDER + ORDERBOOK) */
.sidebar-right {
  background: var(--bg-panel);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.trade-panel {
  padding: 14px;
  border-bottom: 1px solid var(--border-color);
}

.trade-type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}
.trade-type-btn {
  background: transparent;
  border: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.trade-type-btn.active.buy {
  background: var(--color-green);
  color: #090c10;
  box-shadow: 0 0 12px var(--color-green-glow);
}
.trade-type-btn.active.sell {
  background: var(--color-red);
  color: #ffffff;
  box-shadow: 0 0 12px var(--color-red-glow);
}

.order-mode-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.order-mode-btn {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.order-mode-btn.active {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--bg-active);
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.form-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}
.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.balance-sub {
  font-size: 0.7rem;
  color: var(--color-primary);
}

.input-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-suffix input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px 45px 8px 10px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
}
.input-with-suffix input:focus {
  outline: none;
  border-color: var(--color-primary);
}
.input-with-suffix .suffix {
  position: absolute;
  right: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.pct-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.pct-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
}
.pct-btn:hover {
  border-color: var(--color-primary);
  color: var(--text-main);
}

.leverage-val {
  font-family: var(--font-mono);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.8rem;
}
.custom-range {
  width: 100%;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.tpsl-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.tpsl-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tpsl-item label {
  font-size: 0.68rem;
  color: var(--text-muted);
}
.tpsl-item input {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.order-summary {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
}
.summary-row strong {
  color: var(--text-main);
  font-family: var(--font-mono);
}

/* ORDERBOOK PANEL */
.orderbook-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 14px;
}
.orderbook-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}
.ob-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  padding: 6px;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.ob-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.ob-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.ob-cols-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  color: var(--text-muted);
  font-size: 0.68rem;
  padding-bottom: 4px;
}
.ob-cols-header span:nth-child(2) { text-align: center; }
.ob-cols-header span:nth-child(3) { text-align: right; }

.ob-asks, .ob-bids {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: hidden;
}
.ob-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 2px 0;
  position: relative;
}
.ob-row span:nth-child(2) { text-align: center; color: var(--text-muted); }
.ob-row span:nth-child(3) { text-align: right; color: var(--text-muted); }

.ob-fill-bar {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  opacity: 0.15;
  pointer-events: none;
}
.ob-fill-ask { background: var(--color-red); }
.ob-fill-bid { background: var(--color-green); }

.ob-spread {
  padding: 6px 0;
  margin: 4px 0;
  border-top: 1px dashed var(--border-color);
  border-bottom: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.spread-price {
  font-size: 0.95rem;
  font-weight: 700;
}
.spread-label {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.recent-trades-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

/* TOAST NOTIFICATIONS */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}
.toast {
  background: rgba(18, 22, 33, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-main);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  animation: slideInRight 0.3s ease;
}
.toast.success { border-left-color: var(--color-green); }
.toast.error { border-left-color: var(--color-red); }
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 420px;
  max-width: 90%;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-header h3 {
  font-size: 1.1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}
.wallet-balance-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-focus);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.w-label { font-size: 0.8rem; color: var(--text-muted); }
.w-val { font-family: var(--font-mono); font-size: 1.6rem; font-weight: 700; color: var(--color-green); }

/* FULLSCREEN TRANSLUCENT AUTH GATEWAY & BACKDROP BLUR */
body.auth-locked .navbar,
body.auth-locked .dashboard-container {
  filter: blur(14px) brightness(0.5);
  pointer-events: none;
  user-select: none;
  transition: filter 0.4s ease;
}

.auth-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(9, 12, 16, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.auth-gate-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-gate-card {
  background: rgba(18, 22, 33, 0.78) !important;
  backdrop-filter: blur(28px) !important;
  -webkit-backdrop-filter: blur(28px) !important;
  border: 1px solid rgba(0, 242, 254, 0.3) !important;
  border-radius: var(--radius-lg);
  width: 440px;
  max-width: 90%;
  padding: 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 242, 254, 0.15);
  animation: gatePopIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gatePopIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.auth-gate-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.brand-logo.lg {
  width: 44px;
  height: 44px;
  font-size: 1.4rem;
}

.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  margin-bottom: 16px;
}

.auth-tab-btn {
  flex: 1;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.auth-tab-btn.active {
  background: var(--color-primary);
  color: #090c10;
  font-weight: 700;
}

.auth-header-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-profile-menu {
  position: relative;
}

.user-profile-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s ease;
}

.user-profile-btn:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #090c10;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-vip {
  font-size: 0.6rem;
  font-weight: 700;
  background: rgba(0, 242, 254, 0.15);
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  padding: 1px 5px;
  border-radius: 4px;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  background: rgba(18, 22, 33, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 250;
  display: flex;
  flex-direction: column;
}

.user-info-card {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.u-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.u-email {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.u-status {
  font-size: 0.68rem;
  color: var(--color-green);
  margin-top: 4px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 6px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-welcome h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.auth-welcome p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon i {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.input-with-icon input {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 38px 10px 36px;
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 0.88rem;
}

.input-with-icon input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.pwd-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
}

.pwd-toggle:hover {
  color: var(--text-main);
}

.forgot-link {
  font-size: 0.72rem;
  color: var(--color-primary);
  text-decoration: none;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.auth-error-box {
  background: rgba(255, 59, 105, 0.15);
  border: 1px solid var(--color-red);
  border-radius: var(--radius-sm);
  color: var(--color-red);
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 500;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 4px 0;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
  padding: 0 10px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .dashboard-container {
    grid-template-columns: 220px 1fr 280px;
  }
}

@media (max-width: 992px) {
  .dashboard-container {
    grid-template-columns: 1fr 300px;
  }
  .sidebar-left {
    display: none;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    grid-template-columns: 1fr;
    height: auto;
    overflow: auto;
  }
  .header-stats {
    display: none;
  }
  .sidebar-right {
    height: auto;
  }
}