/* =============================
   FONT: Space Grotesk (Local)
   ============================= */
@font-face {
  font-family: 'Space Grotesk';
  src: url('/Fonts/SpaceGrotesk/static/SpaceGrotesk-Regular.ttf') format('ttf');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('/Fonts/SpaceGrotesk/static/SpaceGrotesk-Bold.ttf') format('ttf');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =============================
   ROOT VARIABLES
   ============================= */
:root {
  --bg-black: #000000;
  --bg-white: #ffffff;
  --text-white: #ffffff;
  --text-black: #000000;
  --border-grey: #e5e5e5;
  --muted-grey: #9ca3af;
}

/* =============================
   RESET
   ============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  background: var(--bg-black);
  color: var(--text-white);
  line-height: 1.6;
}

/* =============================
   LAYOUT
   ============================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.card {
  background: var(--bg-white);
  color: var(--text-black);
  border-radius: 8px;
  padding: 24px;
}

/* =============================
   TYPOGRAPHY
   ============================= */
h1, h2, h3 {
  font-weight: 700;
}

p {
  font-size: 15px;
  color: var(--muted-grey);
}

/* =============================
   FORM ELEMENTS
   ============================= */
label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

input, select {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  outline: none;
}

input:focus, select:focus {
  border-color: #000;
}

/* =============================
   BUTTONS
   ============================= */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: var(--bg-black);
  color: var(--text-white);
  border: 1px solid var(--bg-black);
  border-radius: 6px;
  cursor: pointer;
}

.button.secondary {
  background: var(--bg-white);
  color: var(--text-black);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* =============================
   UTILITIES
   ============================= */
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.grid {
  display: grid;
  gap: 16px;
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

/* =============================
   TABLE RESPONSIVENESS
   ============================= */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

thead th {
  padding: 10px 6px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 11px;
  color: #6b7280;
}

tbody td {
  padding: 10px 6px;
  border-bottom: 1px solid #f0f0f0;
}

td.buy {
  color: #065f46;
  font-weight: 600;
}

td.sell {
  color: #7f1d1d;
  font-weight: 600;
}

tbody tr:hover {
  background: #fafafa;
}

/* =============================
   RESPONSIVE ADJUSTMENTS
   ============================= */
@media (max-width: 768px) {
  table {
    font-size: 12px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  html, body {
    font-size: 14px;
  }

  .container {
    padding: 16px;
  }

  .card {
    padding: 16px;
  }

  h1, h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 14px;
  }

  p {
    font-size: 14px;
  }

  table {
    font-size: 11px;
  }

  tbody td, thead th {
    padding: 6px 4px;
  }

  .grid-3 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  header div {
    flex-wrap: wrap;
    gap: 8px;
  }

  header h2 {
    margin-bottom: 8px;
  }

  .button {
    font-size: 12px;
    padding: 8px 12px;
    width: 100%;
  }

  /* Hide less important table columns */
  table td:nth-child(7),
  table th:nth-child(7),
  table td:nth-child(8),
  table th:nth-child(8) {
    display: none;
  }
}
