/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[12].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/**
 * Global Styles for ATHENA Trading App
 * Converted from Electron app (renderer/styles.css)
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Colors — Emerald/Cyan palette */
  --bg: #0b0d10;
  --panel: #13161c;
  --panel-solid: #13161c;
  --text: #e8ecf1;
  --text-secondary: #8b95a8;
  --text-dim: #525c6f;
  --text-chart: #d1d5db;
  --text-white: #ffffff;
  --text-disabled: rgba(171, 179, 189, 0.3);
  --accent: #10B981;
  --accent-glow: rgba(16, 185, 129, 0.15);
  --accent-gradient: linear-gradient(135deg, #10B981, #06b6d4);
  --accent-text: #111;
  --accent-light: #34d399;
  --accent-lighter: #5eead4;
  --accent-bg: rgba(16, 185, 129, 0.1);
  --accent-bg-subtle: rgba(16, 185, 129, 0.08);
  --accent-bg-faint: rgba(16, 185, 129, 0.05);
  --accent-border: rgba(16, 185, 129, 0.3);

  /* Semantic status colors */
  --color-success: #22c55e;
  --color-success-text: #b6f3d1;
  --color-success-bg: #0a3622;
  --color-success-bg-end: #0d4a2e;
  --color-success-border: #0f5132;
  --color-success-bg-hover: rgba(34, 197, 94, 0.1);
  --color-success-depth: rgba(34, 197, 94, 0.15);
  --color-success-border-subtle: rgba(0, 197, 102, 0.2);
  --color-success-chip-bg: rgba(34, 197, 94, 0.12);
  --color-danger: #f43f5e;
  --color-danger-bright: #ef4444;
  --color-danger-text: #ffd9de;
  --color-danger-bg: #2c0b0e;
  --color-danger-border: #842029;
  --color-danger-bg-hover: rgba(244, 63, 94, 0.1);
  --color-danger-depth: rgba(244, 63, 94, 0.15);
  --color-danger-border-subtle: rgba(255, 77, 77, 0.2);
  --color-danger-chip-bg: rgba(244, 63, 94, 0.12);
  --color-danger-gradient-start: #2a0e12;
  --color-danger-gradient-end: #3a1218;
  --color-warn: #f59e0b;
  --color-warn-dark: #d97706;
  --color-warn-bg: rgba(245, 158, 11, 0.1);
  --color-warn-border: rgba(245, 158, 11, 0.3);
  --color-info-bg: #0f2849;
  --color-info-border: #1b4478;
  --color-info-text: #a8c7fa;

  /* Tab colors */
  --tab: rgba(19, 22, 28, 0.9);
  --tab-active: #10B981;
  --tab-active-text: #0b0d10;

  /* GPT Bot colors */
  --gpt-purple: rgba(106, 17, 203, 0.9);
  --gpt-blue: rgba(37, 117, 252, 0.9);
  --gpt-purple-muted: rgba(106, 17, 203, 0.7);
  --gpt-blue-muted: rgba(37, 117, 252, 0.7);
  --gpt-purple-solid: #6a11cb;
  --gpt-blue-solid: #2575fc;
  --gpt-violet: #a855f7;
  --gpt-gradient: linear-gradient(135deg, rgba(106, 17, 203, 0.4), rgba(37, 117, 252, 0.4));
  --gpt-gradient-light: linear-gradient(135deg, rgba(106, 17, 203, 0.3), rgba(37, 117, 252, 0.3));

  /* Borders */
  --border: rgba(30, 35, 48, 1);
  --border-subtle: rgba(30, 35, 48, 0.6);
  --border-panel: #232a38;
  --border-input: #1b2430;
  --border-glow: rgba(16, 185, 129, 0.2);
  --border-hover: rgba(255, 255, 255, 0.12);
  --border-hover-strong: rgba(255, 255, 255, 0.3);
  --border-faint: rgba(255, 255, 255, 0.06);

  /* Surfaces — layered depth */
  --surface-0: #0b0d10;
  --surface-1: #13161c;
  --surface-2: #1a1e27;
  --surface-thead: #0f1117;
  --surface-input: #0f1117;
  --surface-code: #1a1e27;
  --surface-modal: rgba(14, 19, 27, 0.95);
  --surface-modal-heavy: rgba(14, 19, 27, 0.92);
  --surface-disabled: rgba(100, 100, 100, 0.2);
  --surface-hover: rgba(255, 255, 255, 0.05);
  --surface-hover-faint: rgba(255, 255, 255, 0.03);
  --surface-hover-subtle: rgba(255, 255, 255, 0.02);
  --surface-elevated: rgba(0, 0, 0, 0.2);
  --surface-header: rgba(19, 22, 28, 0.85);
  --surface-footer: rgba(10, 14, 20, 0.8);

  /* Overlays / Backdrops */
  --overlay-backdrop: rgba(0, 0, 0, 0.75);
  --overlay-heavy: rgba(0, 0, 0, 0.85);
  --overlay-medium: rgba(0, 0, 0, 0.3);
  --overlay-header: rgba(0, 0, 0, 0.15);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 8px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  --shadow-modal-top: 0 -8px 40px rgba(0, 0, 0, 0.6);
  --shadow-accent-sm: 0 0 20px rgba(16, 185, 129, 0.15);
  --shadow-accent-md: 0 0 30px rgba(16, 185, 129, 0.25);
  --shadow-accent-hover: 0 4px 20px rgba(16, 185, 129, 0.35);
  --shadow-accent-glow: 0 4px 20px rgba(16, 185, 129, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-warn: 0 4px 12px rgba(245, 158, 11, 0.3);
  --shadow-warn-hover: 0 6px 16px rgba(245, 158, 11, 0.4);
  --shadow-side-panel: -8px 0 40px rgba(0, 0, 0, 0.5);
  --shadow-danger-hover: 0 0 20px rgba(255, 77, 77, 0.12);
  --shadow-success-hover: 0 0 20px rgba(0, 197, 102, 0.12);
  --shadow-thumb: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-panel-inset: 0 0 0 1px rgba(255, 255, 255, 0.03) inset, 0 4px 24px rgba(0, 0, 0, 0.25);
  --shadow-gpt-float: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 30px rgba(106, 17, 203, 0.4);
  --shadow-gpt-float-hover: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 40px rgba(106, 17, 203, 0.6);
  --shadow-gpt-float-bright: 0 6px 25px rgba(0, 0, 0, 0.5), 0 0 45px rgba(106, 17, 203, 0.6);
  --shadow-gpt-glow: 0 0 6px 1px rgba(106, 17, 203, 0.5), 0 0 14px 3px rgba(106, 17, 203, 0.3), 0 0 24px 6px rgba(37, 117, 252, 0.15);
  --shadow-gpt-glow-bright: 0 0 8px 2px rgba(106, 17, 203, 0.6), 0 0 18px 5px rgba(106, 17, 203, 0.35), 0 0 30px 8px rgba(37, 117, 252, 0.2);
  --shadow-bot-hover: 0 0 25px rgba(0, 240, 255, 0.25), 0 0 45px rgba(255, 0, 212, 0.2);
  --border-gpt: 2px solid rgba(106, 17, 203, 0.6);

  /* Z-index scale */
  --z-base: 1;
  --z-header: 100;
  --z-float: 900;
  --z-modal-backdrop: 1000;
  --z-modal: 1001;
  --z-modal-critical-backdrop: 1010;
  --z-modal-critical: 1011;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;

  /* Border radius scale */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-full: 999px;

  /* Font families */
  --font-mono: 'Fira Code', 'SF Mono', 'Monaco', 'Courier New', monospace;

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Font sizes */
  --font-size-2xs: 10px;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 13px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 28px;
  --font-size-5xl: 32px;

  /* Letter spacing */
  --letter-spacing-tight: 0.01em;
  --letter-spacing-normal: 0.03em;
  --letter-spacing-wide: 0.05em;

  /* Element size tiers */
  --input-height: 44px;
  --input-padding: 10px 14px;
  --input-font-size: 14px;

  --input-sm-height: 36px;
  --input-sm-padding: 6px 12px;
  --input-sm-font-size: 13px;

  --input-xs-height: 28px;
  --input-xs-padding: 4px 8px;
  --input-xs-font-size: 12px;

  /* Modal header padding (consistent across all modals) */
  --modal-header-padding: 20px 24px;
  --modal-content-padding: 24px;
  --modal-footer-padding: 16px 24px;

  /* Table font size */
  --table-font-size: 13px;
  --table-header-font-size: 12px;
}

html {
  height: 100%;
  font-size: var(--font-size-md);
  background: var(--bg);
}

/* Subtle radial gradient behind content for depth */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.02), transparent),
    radial-gradient(ellipse 60% 40% at 80% 50%, rgba(6, 182, 212, 0.01), transparent);
  pointer-events: none;
  z-index: -1;
}

body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  padding: 0;
  margin: 0;
  letter-spacing: var(--letter-spacing-tight);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.wrap {
  padding: 16px;
  margin-top: 106px; /* Account for ticker bar (36px) + header (56px) + gap (14px) */
  flex: 1 0 auto; /* Allow natural growth, page scrolls as whole */
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 20px;
  gap: 20px;
}

.card {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: none;
  box-shadow: none;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.08), rgba(16, 185, 129, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  transition: background var(--transition-slow);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.35), rgba(6, 182, 212, 0.18), rgba(16, 185, 129, 0.1));
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Form Elements */
label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin: 12px 0 6px;
}

.field-wrap {
  position: relative;
}

input,
select,
textarea {
  width: 100%;
  background: var(--surface-input);
  color: var(--text);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: var(--input-padding);
  font-size: var(--input-font-size);
  height: var(--input-height);
  outline: none;
  font-family: inherit;
  line-height: 1.5;
}

textarea {
  height: auto;
  min-height: var(--input-height);
}

input[type="range"],
input[type="checkbox"] {
  height: auto;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Keyboard-only focus indicator (WCAG 2.1 AA) */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[readonly],
textarea[readonly] {
  cursor: not-allowed;
  opacity: 0.6;
}

input:disabled,
textarea:disabled {
  background-color: var(--surface-input);
  opacity: 0.5;
  cursor: not-allowed;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-panel);
  background: var(--surface-input);
  color: var(--text);
  border-radius: var(--radius-lg);
  padding: var(--input-padding);
  height: var(--input-height);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  font-size: var(--input-font-size);
  font-weight: var(--font-weight-semibold);
  line-height: 1.5;
  transition: all var(--transition-fast);
}

.btn:hover:not(:disabled) {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.btn.primary {
  background: var(--accent-gradient);
  color: var(--accent-text);
  border-color: var(--accent-border);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-accent-sm);
}

.btn.primary:hover:not(:disabled) {
  box-shadow: var(--shadow-accent-md), var(--shadow-sm);
}

.btn.full {
  width: 100%;
}

.btn.danger {
  background: linear-gradient(135deg, var(--color-danger-gradient-start), var(--color-danger-gradient-end));
  border-color: var(--color-danger-border-subtle);
  color: var(--color-danger-text);
}

.btn.danger:hover:not(:disabled) {
  box-shadow: var(--shadow-danger-hover);
}

.btn.success {
  background: linear-gradient(135deg, var(--color-success-bg), var(--color-success-bg-end));
  border-color: var(--color-success-border-subtle);
  color: var(--color-success-text);
}

.btn.success:hover:not(:disabled) {
  box-shadow: var(--shadow-success-hover);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border-panel);
}

.btn-sm {
  padding: var(--input-sm-padding);
  height: var(--input-sm-height);
  font-size: var(--input-sm-font-size);
  font-weight: var(--font-weight-semibold);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Small form elements (compact inputs/selects/buttons in OrderTicket etc.) */
.input-sm {
  height: var(--input-sm-height);
  padding: var(--input-sm-padding);
  font-size: var(--input-sm-font-size);
}

/* Extra-small form elements (leverage presets, percentage inputs, etc.) */
.input-xs {
  height: var(--input-xs-height);
  padding: var(--input-xs-padding);
  font-size: var(--input-xs-font-size);
}

/* Input Buttons */
.input-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--surface-input);
  border: 1px solid var(--border-panel);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: var(--input-sm-padding);
  font-size: var(--input-sm-font-size);
  height: auto;
  cursor: pointer;
}

.input-btn:hover {
  filter: brightness(1.1);
}

.input-btn.x {
  width: 36px;
  padding: 6px 0;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-glow);
  border: 1px solid var(--border-glow);
  color: var(--accent);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-wide);
  vertical-align: middle;
}

.badge.env {
  flex-shrink: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-md);
}

th,
td {
  padding: 8px 10px;
  text-align: left;
}

th {
  color: var(--text-dim);
  font-weight: var(--font-weight-semibold);
  border-bottom: 1px solid var(--border-input);
}

td {
  border-bottom: 1px solid var(--border-subtle);
}

tr:hover td {
  background: var(--surface-hover-subtle);
}

/* Messages */
.msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin: 12px 0;
  font-size: var(--font-size-md);
}

.msg--info {
  background: var(--color-info-bg);
  border: 1px solid var(--color-info-border);
  color: var(--color-info-text);
}

.msg--success {
  background: var(--color-success-bg);
  border: 1px solid var(--color-success-border);
  color: var(--color-success-text);
}

.msg--error {
  background: var(--color-danger-bg);
  border: 1px solid var(--color-danger-border);
  color: var(--color-danger-text);
}

/* Loading Spinner */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--overlay-backdrop);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  padding: 20px;
}

.modal {
  background: var(--surface-modal);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-panel);
  border-radius: var(--radius-xl);
  padding: var(--modal-content-padding);
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-modal);
}

.modal h3 {
  margin: 0 0 16px 0;
  font-size: var(--font-size-2xl);
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  justify-content: flex-end;
}

/* Utility Classes */
.monospace {
  font-family: var(--font-mono);
}

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

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

.text-muted {
  color: var(--text-dim);
}

.text-success {
  color: var(--color-success);
}

.text-danger {
  color: var(--color-danger);
}

/* Side color coding — Market column only (first td in row) */
tr.price-bid > td:first-child {
  color: var(--color-success);
}

tr.price-ask > td:first-child {
  color: var(--color-danger);
}

.hidden {
  display: none !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-panel);
  border-radius: var(--radius-xs);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ========================================
   TICKER BAR
   ======================================== */
.ticker-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: 36px;
  background: var(--bg);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: transform var(--transition-slow);
}

.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerScroll 40s linear infinite;
  will-change: transform;
}

.ticker-track:hover {
  animation-play-state: paused;
}

@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-right: 1px solid var(--border-subtle);
  height: 36px;
  cursor: default;
  transition: background var(--transition-base);
}

.ticker-item:hover {
  background: var(--surface-hover-subtle);
}

.ticker-item .ticker-symbol {
  color: var(--text-secondary);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-normal);
}

.ticker-item .ticker-price {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  color: var(--text);
  font-weight: var(--font-weight-medium);
}

.ticker-item .ticker-change {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
}

.ticker-item .ticker-change.up {
  color: var(--color-success);
  background: var(--color-success-chip-bg);
}

.ticker-item .ticker-change.down {
  color: var(--color-danger);
  background: var(--color-danger-chip-bg);
}

/* Header & Footer */
.header {
  position: fixed;
  top: 36px; /* Below ticker bar (36px) */
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  padding: 0 24px;
  background: var(--surface-header);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  z-index: var(--z-header);
  transition: top var(--transition-slow);
}

/* When ticker bar is hidden (scrolled down), header slides up to top */
html[data-ticker-hidden="1"] .header {
  top: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.header-right {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

/* Simple Login Header - Uses grid for perfect centering */
.simple-login-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  z-index: var(--z-header);
}

.simple-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  justify-self: start;
  grid-column: 1;
  grid-row: 1;
}

.simple-header-center {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  grid-column: 2;
  grid-row: 1;
}

.simple-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
}

/* Hide mobile message by default - shown only on mobile */
.simple-header-mobile-message {
  display: none;
}

.logo {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  color: var(--accent);
  white-space: nowrap;
  display: flex;
  align-items: center;
  line-height: 1;
  flex-shrink: 0;
}

/* Header logo image - using inline styles only */

.user-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  background: var(--surface-footer);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  position: relative;
}

.footer-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-legal-link {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition-base);
}

.footer-legal-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.footer-separator {
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.status-indicator {
  display: inline-block;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Tabs */
.tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  background: var(--tab);
  border-radius: var(--radius-lg);
  align-items: stretch;
}

.tab-btn {
  flex: 0 0 auto;
  min-height: var(--input-sm-height);
  padding: 0 20px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: var(--input-sm-font-size);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-btn:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.tab-btn.active {
  background: var(--accent);
  color: var(--tab-active-text);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Tab Content */
.tab-content {
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Main Control Area (1:2 grid for Trade:GPT Bot) */
.main-control-area {
  display: grid;
  grid-template-columns: 1fr 2fr;
  grid-gap: 20px;
  gap: 20px;
  margin-bottom: 20px;
}

.left-column-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-column-gpt {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* Height: 0 prevents this column from influencing the grid row height.
     min-height: 100% then stretches it to match the left column's height.
     Combined with overflow: hidden, GPT content scrolls instead of stretching. */
  height: 0;
  min-height: 100%;
  overflow: hidden;
}

/* GPT Bot Card */
.gpt-bot-card {
  display: flex;
  flex-direction: column;
  height: 100%; /* Fill container height to match Trade section */
  min-height: 0; /* Allow flex child to shrink below content size */
  overflow: hidden;
}



.bot-section-title {
  margin: 0;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
}

.gpt-card-grid {
  display: flex;
  flex-direction: column;
}

.duration-subheading {
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-semibold);
  color: var(--text-dim);
  margin: 0 0 12px 0;
}

.duration-btn {
  transition: all var(--transition-base);
}

.duration-btn.active {
  background: var(--accent);
  color: var(--tab-active-text);
  border-color: var(--accent-border);
}

.bot-button {
  position: relative;
  padding: 14px 32px !important;
  border: none !important;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-lg) !important;
  font-weight: var(--font-weight-semibold) !important;
  color: var(--text-white) !important;
  background: linear-gradient(135deg,
      var(--gpt-purple-muted),
      var(--gpt-blue-muted)) !important;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-wide);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  overflow: hidden;
}

.bot-button::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg,
      rgba(0, 240, 255, 0.35),
      rgba(0, 255, 149, 0.35),
      rgba(255, 0, 212, 0.4),
      rgba(0, 240, 255, 0.35));
  animation: rotateGlow 6s linear infinite;
  filter: blur(24px);
  opacity: 0.6;
  z-index: 0;
}

.bot-button span {
  position: relative;
  z-index: 1;
}

.bot-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-bot-hover);
}

.bot-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.gpt-message-box {
  flex: 1 1;
  min-height: 0; /* Allow flex child to shrink below content size */
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: var(--font-size-md);
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.gpt-message-box h2,
.gpt-message-box h3 {
  color: var(--accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  margin: 20px 0 8px 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.gpt-message-box h2:first-child,
.gpt-message-box h3:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.gpt-message-box p {
  margin: 8px 0;
  color: var(--text);
}

.gpt-message-box ol,
.gpt-message-box ul {
  margin: 0;
  padding-left: 24px;
  color: var(--text);
}

.gpt-message-box li {
  margin: 0 0 8px 0;
}

.gpt-message-box li:last-child {
  margin-bottom: 0;
}

.gpt-message-box li .li-heading {
  display: inline;
}

.gpt-message-box strong {
  color: var(--accent);
  font-weight: var(--font-weight-semibold);
}

.gpt-glossary {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  line-height: 1.7;
  color: var(--text-secondary);
}

.gpt-glossary strong {
  color: var(--text);
}

/* GPT recommendation highlight — animated gradient glow border */
.gpt-highlight {
  position: relative;
  border: var(--border-gpt) !important;
  background-clip: padding-box !important;
  box-shadow: var(--shadow-gpt-glow);
  animation: gpt-glow-pulse 2s ease-in-out infinite;
}

.gpt-highlight::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  padding: 3px;
  background: linear-gradient(135deg, var(--gpt-purple-solid), var(--gpt-blue-solid), var(--gpt-violet), var(--gpt-purple-solid));
  background-size: 300% 300%;
  animation: gpt-border-shimmer 2.5s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes gpt-glow-pulse {
  0%, 100% { box-shadow: var(--shadow-gpt-glow); }
  50% { box-shadow: var(--shadow-gpt-glow-bright); }
}

@keyframes gpt-border-shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gpt-section-header {
  color: var(--accent);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-lg);
  margin: 16px 0 8px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}

.gpt-section-header:first-child {
  margin-top: 0;
  border-top: none;
  padding-top: 0;
}


/* Divider */
.divider {
  height: 1px;
  background: var(--border-hover);
  margin: 4px 0;
}

/* Hide TradingView watermark */
div[style*="pointer-events"][style*="position: absolute"] a[target="_blank"],
.tv-lightweight-charts a[target="_blank"],
.tv-lightweight-charts div[style*="watermark"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

/* Position Slider Styling */
.position-slider {
  -webkit-appearance: none;
  -moz-appearance: none;
       appearance: none;
  width: 100%;
  height: 14px;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

/* Position Slider Container - the rounded box */
.position-slider-container {
  background: var(--surface-input);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  position: relative;
}

/* Webkit (Chrome, Safari, Edge) - Track */
.position-slider::-webkit-slider-track {
  width: 100%;
  height: 2px;
  background: transparent;
  border-radius: 1px;
}

/* Webkit - Thumb */
.position-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  margin-top: 0;
  transform: translateY(0);
  box-shadow: var(--shadow-thumb);
}

/* Firefox - Track */
.position-slider::-moz-range-track {
  width: 100%;
  height: 2px;
  background: transparent;
  border-radius: 1px;
}

/* Firefox - Thumb */
.position-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: var(--shadow-thumb);
}

/* Firefox - Progress (filled portion) */
.position-slider::-moz-range-progress {
  background: transparent;
  height: 2px;
  border-radius: 1px;
}

/* Hover effects */
.position-slider:hover::-webkit-slider-thumb {
  background: var(--accent-light);
  transform: scale(1.1);
}

.position-slider:hover::-moz-range-thumb {
  background: var(--accent-light);
  transform: scale(1.1);
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   Breakpoint: 768px (Standard tablet/mobile)
   ======================================== */

@media (max-width: 767px) {
  /* === LAYOUT === */

  /* Reduce padding on mobile for more space */
  .wrap {
    padding: 12px;
    margin-top: 100px; /* Account for ticker bar (32px) + header (56px) + gap (12px) */
  }

  /* Ticker bar smaller on mobile */
  .ticker-bar {
    height: 32px;
  }

  .ticker-item {
    padding: 0 16px;
    font-size: var(--font-size-xs);
    height: 32px;
  }

  .header {
    top: 32px; /* Smaller ticker bar on mobile */
  }

  /* Convert all grids to single column */
  .grid,
  .main-control-area {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }

  /* Hide inline GPT Bot on mobile (will use floating button instead) */
  .right-column-gpt {
    display: none !important;
  }

  /* Hide header environment badge on mobile (shown in hamburger menu instead) */
  .header-env-badge {
    display: none !important;
  }

  /* === TYPOGRAPHY === */

  /* Prevent iOS zoom on input focus (font-size must be 16px+) */
  input,
  select,
  textarea {
    font-size: var(--font-size-lg) !important;
    min-height: 44px; /* Apple HIG minimum touch target */
    height: auto; /* Let mobile elements size naturally with min-height */
  }

  /* Adjust body font for mobile readability */
  body {
    font-size: var(--font-size-md);
  }

  /* === BUTTONS & TOUCH TARGETS === */

  /* Increase button height for touch (48px for better mobile UX) */
  .btn {
    min-height: 48px;
    height: auto;
    padding: 14px 16px;
    font-size: var(--font-size-lg);
  }

  .btn-sm {
    min-height: 40px;
    height: auto;
    padding: 10px 12px;
    font-size: var(--font-size-base);
  }

  /* Tier classes override generic mobile touch targets */
  input.input-sm,
  select.input-sm,
  button.input-sm,
  .btn-sm {
    min-height: var(--input-sm-height);
    height: var(--input-sm-height);
  }

  input.input-xs,
  select.input-xs,
  button.input-xs {
    min-height: var(--input-xs-height);
    height: var(--input-xs-height);
  }

  /* Tab buttons - sm tier on mobile too */
  .tab-btn {
    min-height: var(--input-sm-height);
    padding: 0 16px;
    font-size: var(--input-sm-font-size);
  }

  /* === HEADER === */

  .header {
    padding: 0 12px;
    height: 56px;
    display: flex;
    flex-wrap: wrap;
  }

  .header-left {
    flex: 0 0 auto;
    gap: 8px;
  }

  .header-right {
    flex: 0 0 auto;
    gap: 8px;
  }

  /* Simple Login Header Mobile */
  .simple-login-header {
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .simple-header-left {
    flex: 0 0 auto;
    gap: 8px;
    justify-self: unset;
    grid-column: unset;
    grid-row: unset;
  }

  /* Hide desktop center message on mobile */
  .simple-header-center {
    display: none !important;
  }

  .simple-header-right {
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
    justify-self: unset;
    grid-column: unset;
    grid-row: unset;
  }

  /* Show mobile message banner below header elements */
  .simple-header-mobile-message {
    display: block;
    flex: 1 1;
    min-width: 100%;
    order: 3;
    margin-top: 8px;
  }

  .logo {
    font-size: var(--font-size-lg);
  }

  .badge.env {
    font-size: var(--font-size-xs);
    padding: 2px 6px;
    flex-shrink: 0;
  }

  /* Hide user info text on very small screens */
  .user-info {
    font-size: var(--font-size-base);
  }

  /* === FOOTER === */

  .footer {
    padding: 8px 12px;
    flex-direction: column;
    gap: 8px;
  }

  .footer-center {
    position: static;
    transform: none;
    order: 3;
  }

  .footer-left,
  .footer-right {
    margin-left: 0;
    font-size: var(--font-size-xs);
  }

  .footer-legal-link {
    font-size: var(--font-size-xs);
    padding: 2px 4px;
  }

  /* === CARDS === */

  .card {
    padding: 14px;
    border-radius: var(--radius-md);
  }

  /* === TABLES === */

  /* Add horizontal scroll wrapper for tables */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
  }

  /* Add shadow gradient to indicate scrollability */
  .table-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, transparent, var(--panel));
    pointer-events: none;
  }

  table {
    min-width: 600px; /* Force horizontal scroll on narrow screens */
    font-size: var(--font-size-base);
  }

  /* border-collapse: separate fixes borders disappearing with sticky columns */
  .table-wrapper table {
    border-collapse: separate;
    border-spacing: 0;
  }

  th,
  td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  /* First column sticky for better UX */
  th:first-child,
  td:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    background: var(--panel);
    z-index: 1;
  }

  /* Ensure sticky column stays opaque on highlighted rows */
  tr:hover td:first-child {
    background: var(--panel);
  }

  /* === MODALS === */

  .modal-backdrop {
    padding: 0;
    align-items: flex-end; /* Slide up from bottom on mobile */
  }

  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }

  /* === FORMS === */

  label {
    margin: 10px 0 6px;
    font-size: var(--font-size-md);
  }

  /* Larger slider thumb for easier touch control */
  .position-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .position-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
  }

  /* === GPT BOT === */

  /* Adjust GPT message box for mobile */
  .gpt-message-box {
    min-height: 250px;
    font-size: var(--font-size-base);
  }

  /* === UTILITY CLASSES === */

  /* Mobile-only display utilities */
  .mobile-only {
    display: block !important;
  }

  /* Exception for flex containers on mobile */
  .mobile-only.mobile-market-selector {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* Mobile column stacking */
  .mobile-stack {
    flex-direction: column !important;
  }

  .mobile-full-width {
    width: 100% !important;
  }

  /* === CHECKBOX === */

  /* Smaller checkbox on mobile to prevent overflow */
  input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    flex-shrink: 0;
  }
}

/* === TABLET OPTIMIZATION (768px - 1024px) === */
@media (min-width: 768px) and (max-width: 1024px) {
  /* Slightly reduce grid gaps on tablets */
  .grid,
  .main-control-area {
    gap: 16px;
  }

  .wrap {
    padding: 16px;
  }
}

/* === DESKTOP ONLY (> 768px) === */
@media (min-width: 768px) {
  /* Hide mobile-specific elements on desktop */
  .mobile-only {
    display: none !important;
  }

  /* Show desktop-only elements */
  .desktop-only {
    display: block;
  }

  /* Ensure header-right stays flex even with desktop-only class */
  .header-right.desktop-only {
    display: flex;
  }

  /* Ensure header-left maintains flex layout on desktop */
  .header-left {
    display: flex !important;
    align-items: center;
    gap: 12px;
  }

  /* Ensure header environment badge is visible and inline on desktop */
  .header-env-badge {
    display: inline-block !important;
  }

  /* Ensure footer-left stays flex even with desktop-only class */
  .footer-left.desktop-only {
    display: flex;
  }

  /* Reset footer to row layout on desktop */
  .footer {
    flex-direction: row;
  }

  /* Safari-specific fix for select height */
  select {
    -webkit-appearance: menulist;
    -moz-appearance: menulist;
         appearance: menulist;
  }

  /* Consistent checkbox size on desktop */
  input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-height: 24px;
    flex-shrink: 0;
  }

  /* Hide floating GPT button on desktop (inline version used instead) */
  .gpt-float-button {
    display: none !important;
  }
}

/* === SKELETON LOADING ANIMATIONS === */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.05) 25%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0.05) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Table skeleton container */
.table-skeleton {
  padding: 16px;
}

/* === PRICE FLASH ANIMATIONS === */
/* Green flash when price goes up */
@keyframes flash-up {
  0% { background: rgba(0, 197, 102, 0.25); }
  100% { background: transparent; }
}

/* Red flash when price goes down */
@keyframes flash-down {
  0% { background: rgba(255, 77, 77, 0.25); }
  100% { background: transparent; }
}

.price-flash-up {
  animation: flash-up 0.6s ease-out;
}

.price-flash-down {
  animation: flash-down 0.6s ease-out;
}

/* === TABLE ROW FADE-IN ANIMATION === */
@keyframes row-fade-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.table-row-animate {
  animation: row-fade-in 0.3s ease-out both;
}

/* === NEW ROW DROP-IN ANIMATION === */
@keyframes row-drop-in {
  0% {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
  }
  40% {
    opacity: 0.7;
    max-height: 80px;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    max-height: 80px;
  }
}

.table-row-new {
  animation: row-drop-in 0.4s ease-out both;
}


/* === MED-5: MOBILE OPTIMIZATIONS FOR ORDER TICKET === */
@media (max-width: 768px) {
  /* Larger touch targets for all buttons (min 44px) */
  button.btn {
    min-height: 44px;
    padding: 12px 16px;
  }

  /* Larger touch targets for inputs */
  input.input {
    min-height: 44px;
    padding: 10px 12px;
    font-size: var(--font-size-md);
  }

  /* Larger touch targets for select dropdowns */
  select {
    min-height: 44px;
    padding: 10px 12px;
    font-size: var(--font-size-md);
  }

  /* Tier classes override generic mobile touch targets */
  input.input-sm,
  select.input-sm,
  button.input-sm,
  button.btn.btn-sm {
    min-height: var(--input-sm-height);
    height: var(--input-sm-height);
  }

  input.input-xs,
  select.input-xs,
  button.input-xs {
    min-height: var(--input-xs-height);
    height: var(--input-xs-height);
  }

  /* Better spacing between form sections */
  .order-ticket-section {
    margin-bottom: 20px;
  }

  /* Ensure slider has adequate touch area */
  input[type="range"] {
    height: 44px;
    -webkit-appearance: none;
    background: transparent;
  }

  input[type="range"]::-webkit-slider-thumb {
    height: 24px;
    width: 24px;
    cursor: pointer;
  }

  input[type="range"]::-moz-range-thumb {
    height: 24px;
    width: 24px;
    cursor: pointer;
  }

  /* Better spacing for error/success messages */
  .error-message,
  .success-message {
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: var(--font-size-md);
    line-height: 1.5;
  }

  /* Larger touch target for modal close buttons */
  .modal button[aria-label="Close"] {
    min-width: 44px;
    min-height: 44px;
  }

  /* Order ticket header: on mobile, hide desktop margin+presets, show row2 */
  .order-ticket-margin-desktop {
    display: none !important;
  }

  .order-ticket-presets-desktop {
    display: none !important;
  }

  .order-ticket-row2-mobile {
    display: flex !important;
  }
}

/* Order ticket header layout */
.order-ticket-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

/* Desktop: hide mobile row2, show desktop margin+presets */
.order-ticket-row2-mobile {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ══════════════════════════════════════════════════════════════
   AUTO TRADE
   ══════════════════════════════════════════════════════════════ */

.auto-trade-section {
  padding: 20px 0;
}

.auto-trade-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-gap: 12px;
  gap: 12px;
  margin-bottom: 24px;
}

.auto-trade-stats .stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.auto-trade-stats .stat-label {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.auto-trade-stats .stat-value {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  font-family: var(--font-mono);
}

.auto-trade-stats .stat-sub {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: 2px;
}

.strategy-list {
  display: grid;
  grid-gap: 16px;
  gap: 16px;
}

.strategy-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.strategy-card:hover {
  border-color: var(--accent);
}

/* Strategy form buttons */
.bot-type-btn {
  padding: 10px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s;
}

.bot-type-btn:hover {
  border-color: var(--accent);
}

.bot-type-btn.active {
  border-color: var(--accent);
  background: var(--accent-bg, rgba(var(--accent-rgb, 100, 149, 237), 0.1));
}

/* Small action buttons */
.btn-sm {
  padding: 4px 12px;
  font-size: var(--font-size-xs);
  border-radius: var(--radius-sm);
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  border: none;
}

.btn-success { background: var(--color-success); color: #fff; }
.btn-warning { background: var(--color-warning); color: #000; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger-outline { background: none; border: 1px solid var(--color-danger); color: var(--color-danger); }
.btn-ghost { background: none; border: 1px solid var(--border); color: var(--text-secondary); }
.btn-primary { background: var(--accent); color: var(--accent-text); border: none; padding: 8px 16px; border-radius: var(--radius-sm); font-weight: var(--font-weight-semibold); cursor: pointer; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Strategy form modal */
.strategy-form-modal {
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
}

/* Trade log table */
.auto-trade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-xs);
}

.auto-trade-table th {
  text-align: left;
  padding: 6px 8px;
  color: var(--text-secondary);
  font-weight: var(--font-weight-semibold);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.auto-trade-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-light, var(--border));
}

@media (max-width: 768px) {
  .auto-trade-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .strategy-form-modal {
    max-height: 90vh;
  }
}

