/* =========================================================
   BASE: Reset, Utilities, Global Styles
   ========================================================= */

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--bg-hover);
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Utilities */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-mono); }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.no-select {
  user-select: none;
  -webkit-user-select: none;
}

/* Button Base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: var(--font-size-md);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}
.btn-primary:hover {
  background: #3d7aff;
  border-color: #3d7aff;
}
.btn-buy {
  background: var(--accent-green);
  border-color: var(--accent-green);
  color: var(--text-inverse);
  font-weight: 600;
}
.btn-buy:hover {
  background: #0dd88e;
}
.btn-sell {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: white;
  font-weight: 600;
}
.btn-sell:hover {
  background: #ff5a6e;
}
.btn-sm {
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-sm);
}
.btn-icon {
  padding: var(--space-xs);
  width: 28px;
  height: 28px;
}

/* Input Base */
.input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: var(--font-size-md);
  transition: border-color var(--transition-fast);
}
.input:focus {
  outline: none;
  border-color: var(--border-focus);
}
.input::placeholder {
  color: var(--text-muted);
}

/* Panel / Card */
.panel {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--border-color);
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.panel-body {
  padding: var(--space-md);
}
