:root {
  --void: #0a0e17;
  --surface: #0f1419;
  --panel: #131722;
  --elevated: #1a1e2e;
  --border: #2a2e39;
  --border-light: #363a45;
  --bull: #26a69a;
  --bull-dim: #00897b;
  --bull-glow: rgba(38, 166, 154, 0.3);
  --bear: #ef5350;
  --bear-dim: #e53935;
  --bear-glow: rgba(239, 83, 80, 0.3);
  --accent: #2962ff;
  --accent-glow: rgba(41, 98, 255, 0.25);
  --gold: #ffb74d;
  --gold-glow: rgba(255, 183, 77, 0.3);
  --text: #d1d4dc;
  --text-bright: #ffffff;
  --muted: #787b86;
  --header-h: 60px;
  --sidebar-w: 80px;
  --trade-panel-w: 320px;
  --bottom-panel-h: 220px;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #363a45 var(--void);
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background: var(--void);
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #363a45, #2a2e39);
  border-radius: 4px;
  border: 1px solid rgba(41, 98, 255, 0.1);
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #434854, #363a45);
}

body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--void);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* Loading state */
body:not(.loaded) #app-shell {
  opacity: 0;
  transition: opacity 0.3s ease-in;
}

body.loaded #app-shell {
  opacity: 1;
}

.font-mono-nums {
  font-family: "JetBrains Mono", Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Auth ─── */
.auth-backdrop {
  background: rgba(5, 8, 14, 0.88);
  backdrop-filter: blur(12px);
}

.auth-panel {
  background: linear-gradient(135deg, #131722 0%, #1a1e2e 100%);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05) inset,
    0 40px 80px -20px rgba(0, 0, 0, 0.8),
    0 0 100px rgba(41, 98, 255, 0.1);
}

.auth-panel-header {
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.12) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.auth-panel-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(41, 98, 255, 0.4), transparent);
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.25), rgba(38, 166, 154, 0.2));
  border: 1px solid rgba(41, 98, 255, 0.4);
  color: #5e8aff;
  box-shadow: 0 4px 20px rgba(41, 98, 255, 0.2);
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.auth-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--elevated), var(--panel));
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.auth-feature:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(41, 98, 255, 0.15);
}

.auth-feature-icon {
  font-size: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(38, 166, 154, 0.1));
  color: #5e8aff;
  box-shadow: 0 2px 8px rgba(41, 98, 255, 0.2);
}

.auth-input {
  background: #0f1419 !important;
  border: 1px solid var(--border) !important;
  color: #ffffff !important;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.auth-input:focus {
  outline: none !important;
  border-color: var(--accent) !important;
  background: #131722 !important;
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.auth-input::placeholder {
  color: #6b7280 !important;
}

.auth-cta {
  background: linear-gradient(135deg, #2962ff 0%, #1e4fd9 100%);
  box-shadow: 0 6px 24px rgba(41, 98, 255, 0.4), 0 0 40px rgba(41, 98, 255, 0.2);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.auth-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.auth-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(41, 98, 255, 0.5), 0 0 50px rgba(41, 98, 255, 0.3);
}

.auth-cta:hover::before {
  left: 100%;
}

.auth-cta:active {
  transform: translateY(0) scale(0.98);
}

/* ─── Terminal layout ─── */
.terminal-layout {
  height: 100vh;
  height: 100dvh;
}

.terminal-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: linear-gradient(180deg, var(--panel) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 40;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.terminal-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(41, 98, 255, 0.3), transparent);
}

.brand-mark-sm {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.2), rgba(38, 166, 154, 0.15));
  border: 1px solid rgba(41, 98, 255, 0.35);
  color: #5e8aff;
  box-shadow: 0 2px 12px rgba(41, 98, 255, 0.15);
}

.sim-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  padding: 4px 10px;
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(255, 183, 77, 0.15), rgba(255, 152, 0, 0.1));
  color: var(--gold);
  border: 1px solid rgba(255, 183, 77, 0.3);
  box-shadow: 0 0 12px var(--gold-glow);
}

.header-ticker {
  flex: 1;
  justify-content: center;
}

.ticker-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ticker-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ticker-value {
  font-weight: 600;
  color: var(--text);
}

.ticker-price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.2;
  transition: color 0.2s, text-shadow 0.2s;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.balance-card {
  text-align: right;
  padding: 8px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--elevated), var(--panel));
  border: 1px solid var(--border);
  min-width: 140px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.balance-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.balance-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1.3;
  text-shadow: 0 0 20px var(--gold-glow);
}

.balance-user {
  font-size: 10px;
  color: #475569;
  margin-top: 1px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: linear-gradient(135deg, var(--elevated), var(--panel));
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.header-btn:hover {
  color: var(--text-bright);
  border-color: var(--border-light);
  background: linear-gradient(135deg, #1f2937, var(--elevated));
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.header-btn-danger:hover {
  color: var(--bear);
  border-color: rgba(239, 83, 80, 0.5);
  box-shadow: 0 4px 10px var(--bear-glow);
}

.mobile-ticker {
  background: var(--panel);
}

/* ─── Asset sidebar ─── */
.asset-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border-right: 1px solid var(--border);
  padding: 12px 0;
  gap: 6px;
  box-shadow: 4px 0 12px rgba(0, 0, 0, 0.2);
}

.asset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 64px;
  margin: 0 auto;
  padding: 12px 6px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.asset-btn:hover {
  background: linear-gradient(135deg, var(--elevated), rgba(41, 98, 255, 0.05));
  color: var(--text-bright);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.asset-btn.active {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(38, 166, 154, 0.1));
  border-color: rgba(41, 98, 255, 0.5);
  color: #5e8aff;
  box-shadow: 0 0 20px rgba(41, 98, 255, 0.3), inset 0 0 20px rgba(41, 98, 255, 0.1);
}

.asset-btn-icon {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.asset-btn-name {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.9;
}

/* ─── Chart zone ─── */
.terminal-body {
  background: var(--void);
}

.chart-zone {
  border-right: 1px solid var(--border);
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border-bottom: 1px solid var(--border);
  min-height: 44px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bull);
  box-shadow: 0 0 12px var(--bull-glow), 0 0 24px var(--bull-glow);
  animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

.timeframe-pills {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--void);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.tf-pill {
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 7px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tf-pill.active {
  background: linear-gradient(135deg, var(--elevated), var(--panel));
  color: var(--text-bright);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tf-pill:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.chart-canvas {
  position: relative;
  background: var(--void);
  overflow: hidden;
}

#chart-container {
  width: 100%;
  height: 100%;
  min-height: 200px;
}

#chart-wrapper {
  transition: box-shadow 0.25s ease;
}

#chart-wrapper.glow-call {
  box-shadow:
    inset 0 0 0 2px rgba(38, 166, 154, 0.5),
    inset 0 -100px 120px -40px rgba(38, 166, 154, 0.12),
    0 0 40px rgba(38, 166, 154, 0.2);
  animation: glow-pulse-call 0.6s ease;
}

#chart-wrapper.glow-put {
  box-shadow:
    inset 0 0 0 2px rgba(239, 83, 80, 0.5),
    inset 0 -100px 120px -40px rgba(239, 83, 80, 0.12),
    0 0 40px rgba(239, 83, 80, 0.2);
  animation: glow-pulse-put 0.6s ease;
}

@keyframes glow-pulse-call {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(38, 166, 154, 0.5), inset 0 -100px 120px -40px rgba(38, 166, 154, 0.12), 0 0 40px rgba(38, 166, 154, 0.2); }
  50% { box-shadow: inset 0 0 0 2px rgba(38, 166, 154, 0.8), inset 0 -100px 120px -40px rgba(38, 166, 154, 0.2), 0 0 60px rgba(38, 166, 154, 0.4); }
}

@keyframes glow-pulse-put {
  0%, 100% { box-shadow: inset 0 0 0 2px rgba(239, 83, 80, 0.5), inset 0 -100px 120px -40px rgba(239, 83, 80, 0.12), 0 0 40px rgba(239, 83, 80, 0.2); }
  50% { box-shadow: inset 0 0 0 2px rgba(239, 83, 80, 0.8), inset 0 -100px 120px -40px rgba(239, 83, 80, 0.2), 0 0 60px rgba(239, 83, 80, 0.4); }
}

/* ─── Bottom panels ─── */
.bottom-panels {
  height: var(--bottom-panel-h);
  background: linear-gradient(180deg, var(--surface), var(--panel));
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.2);
}

.panel-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  min-height: 40px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--panel), var(--surface));
}

.panel-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-tab:hover {
  color: var(--text-bright);
  background: rgba(41, 98, 255, 0.03);
}

.panel-tab.active {
  color: var(--text-bright);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 10px rgba(41, 98, 255, 0.3);
}

.tab-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #1e4fd9);
  color: white;
  box-shadow: 0 0 10px rgba(41, 98, 255, 0.3);
}

.tab-badge.hidden {
  display: none;
}

.stat-pill {
  font-size: 11px;
  color: var(--muted);
}

.stat-pill strong {
  margin-left: 4px;
}

.panel-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel-content.hidden {
  display: none;
}

.table-scroll {
  height: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--elevated);
}

.data-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--elevated), var(--panel));
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(42, 46, 57, 0.5);
}

.data-table tbody tr {
  transition: all 0.15s ease;
}

.data-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(41, 98, 255, 0.05), rgba(38, 166, 154, 0.03));
  box-shadow: inset 2px 0 0 rgba(41, 98, 255, 0.4);
}

.empty-state {
  padding: 32px 16px;
  text-align: center;
  font-size: 12px;
  color: #475569;
}

.side-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.side-badge.call {
  background: rgba(38, 166, 154, 0.15);
  color: #4db6ac;
  border: 1px solid rgba(38, 166, 154, 0.3);
  box-shadow: 0 0 10px rgba(38, 166, 154, 0.2);
}

.side-badge.put {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
  border: 1px solid rgba(239, 83, 80, 0.3);
  box-shadow: 0 0 10px rgba(239, 83, 80, 0.2);
}

.countdown {
  font-variant-numeric: tabular-nums;
  color: #5e8aff;
  font-weight: 700;
  text-shadow: 0 0 10px rgba(41, 98, 255, 0.3);
}

/* ─── Trade panel ─── */
.trade-panel {
  width: var(--trade-panel-w);
  max-width: 100%;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.2);
}

.trade-panel-header {
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(41, 98, 255, 0.05), transparent);
}

.trade-panel-body {
  padding: 16px 20px;
}

.profit-card {
  background: linear-gradient(135deg, var(--elevated), var(--panel));
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.profit-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
}

.profit-card-highlight {
  background: linear-gradient(135deg, rgba(38, 166, 154, 0.08), rgba(255, 183, 77, 0.05));
  border-top: 1px solid rgba(38, 166, 154, 0.25);
}

.profit-label {
  font-size: 11px;
  color: var(--muted);
}

.profit-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.profit-win {
  color: var(--gold);
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 0 15px var(--gold-glow);
}

.trade-label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

.amount-input-wrap {
  display: flex;
  align-items: center;
  background: #0f1419 !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.amount-input-wrap:focus-within {
  border-color: var(--accent) !important;
  background: #131722 !important;
  box-shadow: 0 0 0 3px var(--accent-glow), inset 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.amount-prefix {
  padding: 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--elevated);
  border-right: 1px solid var(--border);
  align-self: stretch;
  display: flex;
  align-items: center;
}

.amount-input {
  flex: 1;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff !important;
  background: transparent !important;
  border: none;
  outline: none;
  min-width: 0;
}

.quick-amounts {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.qa-btn {
  flex: 1;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.qa-btn:hover {
  border-color: var(--border-light);
  color: var(--text-bright);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.qa-btn.active {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(38, 166, 154, 0.1));
  border-color: rgba(41, 98, 255, 0.5);
  color: #5e8aff;
  box-shadow: 0 0 12px rgba(41, 98, 255, 0.2);
}

.expiry-chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.exp-chip {
  padding: 12px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.exp-chip:hover {
  border-color: var(--border-light);
  color: var(--text-bright);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.exp-chip.active {
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.15), rgba(38, 166, 154, 0.1));
  border-color: rgba(41, 98, 255, 0.5);
  color: #5e8aff;
  box-shadow: 0 0 15px rgba(41, 98, 255, 0.25);
}

.trade-actions {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.trade-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 20px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.trade-btn:active {
  transform: scale(0.98);
}

.trade-btn-icon {
  font-size: 24px;
  line-height: 1;
  opacity: 0.95;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.trade-btn-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.trade-btn-label {
  font-size: 17px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.trade-btn-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.75;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trade-btn-call {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  box-shadow: 0 6px 28px var(--bull-glow), 0 0 40px var(--bull-glow);
  position: relative;
  overflow: hidden;
}

.trade-btn-call::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.trade-btn-call:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--bull-glow), 0 0 50px var(--bull-glow);
}

.trade-btn-call:hover::before {
  opacity: 1;
}

.trade-btn-put {
  background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
  box-shadow: 0 6px 28px var(--bear-glow), 0 0 40px var(--bear-glow);
  position: relative;
  overflow: hidden;
}

.trade-btn-put::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
}

.trade-btn-put:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--bear-glow), 0 0 50px var(--bear-glow);
}

.trade-btn-put:hover::before {
  opacity: 1;
}

.trade-panel-footer {
  padding: 0 16px 12px;
}

/* ─── Price tick animations ─── */
.tick-up {
  color: var(--bull) !important;
  text-shadow: 0 0 15px var(--bull-glow) !important;
}

.tick-down {
  color: var(--bear) !important;
  text-shadow: 0 0 15px var(--bear-glow) !important;
}

.tick-flat {
  color: var(--text-bright);
}

.tick-up,
.tick-down {
  animation: price-flash 0.5s ease;
}

@keyframes price-flash {
  0% { opacity: 0.6; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1); }
}

/* ─── Toasts ─── */
.toast-enter {
  animation: toast-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-exit {
  animation: toast-out 0.25s ease forwards;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toast-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(16px);
  }
}

.terminal-footer {
  padding: 8px 16px;
  font-size: 10px;
  color: #5a5e6b;
  text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--surface));
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);
}

/* ─── Responsive ─── */
@media (max-width: 1023px) {
  :root {
    --trade-panel-w: 260px;
    --bottom-panel-h: 160px;
  }

  .terminal-layout {
    height: auto;
    min-height: 100dvh;
  }

  body {
    overflow: auto;
  }

  .terminal-body {
    flex-direction: column;
  }

  .chart-zone {
    border-right: none;
    min-height: 360px;
  }

  .trade-panel {
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .trade-actions {
    flex-direction: row;
  }

  .trade-btn {
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 12px;
    gap: 6px;
  }

  .trade-btn-sub {
    display: none;
  }
}

@media (max-width: 639px) {
  :root {
    --bottom-panel-h: 120px;
  }

  .chart-zone {
    min-height: 280px;
  }

  .panel-tabs-stats {
    display: none !important;
  }
}
