:root {
    --bg: #202020;
    --text: #fefefa;
    --accent: #f4d04c;
    --accent-2: #bd9225;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
}

canvas {
    width: 100% !important;
    height: 100% !important;
}

.btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 0.7rem;
    background: var(--accent);
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    color: #222;
    font-size: 1rem;
    transition: background 0.15s;
}
.btn:hover {
    background: var(--accent-2);
}

.dashboard {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    gap: 16px;
    padding: 16px;
}

.overview-panel {
    flex: 1 1 0;
    min-width: 300px;
    max-width: 1350px;
    box-sizing: border-box;
    background: #181818;
    border-radius: 16px;
    padding: 16px;
}

.detail-panel {
    flex: 3 1 0;
    min-width: 300px;
    max-width: 1350px;
    box-sizing: border-box;
    background: #181818;
    border-radius: 16px;
    padding: 16px;
}

/* COMMON TITLE STYLE */
.common-title {
    color: var(--accent-2);
    background: #222;
    font-size: 1rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-align: left;
    margin-bottom: 1rem;
}

.common-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a1a1a;
    overflow: hidden;
}

.common-table th,
.common-table td {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #333;
    text-align: left;
}

.common-table td.green-text {
    color: #0a0;
}

.common-table td.red-text {
    color: #c00;
}

.common-table th {
    color: var(--accent-2);
    background: #222;
}

.common-table tr:last-child td {
    border-bottom: none;
}

.common-table td {
    color: var(--text);
}

.common-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.green-text {
    color: #0a0;
}

.red-text {
    color: #c00;
}

.bold-row {
    font-weight: bold;
    border: 2px solid var(--accent-2);
}

/* Narrow columns: keep compact but center their contents for clarity */
.common-table th.narrow-col {
    max-width: 120px;
    min-width: 80px;
    width: 1%;
    overflow-wrap: break-word;
    text-align: center;
    vertical-align: bottom;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.common-table td.narrow-col {
    max-width: 70px;
    min-width: 50px;
    width: 1%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

/* Chart wrap and panel layouts */
.chart-wrap {
    width: 100%;
    height: 300px;
    border: 2px solid var(--accent-2);
    background: #1a1a1a;
}

.charts-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {

    /* width at which layout changes from side-by-side panels to veritical */
    .dashboard {
        flex-direction: column;
    }

    .side-panel,
    .main-panel {
        min-width: 0;
        width: 100%;
        margin-bottom: 16px;
    }

    .main-panel {
        margin-bottom: 0;
    }
}

@media (max-width: 700px) {
    .charts-container {
        flex-direction: column;
    }
}

@media (max-width: 600px) {

    .common-table th,
    .common-table td {
        padding: 0.5rem;
    }
}

.basket-metrics-panel {
    margin-top: 24px;
    padding: 16px;
    background: #181818;
    border-radius: 8px;
    border: 1px solid #222;
    color: #fff;
    max-width: 340px;
}

.basket-metrics-title {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.05em;
}

.basket-metrics-row {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    align-items: center;
}

.basket-metrics-label {
    color: #aaa;
}

.basket-metrics-value {
    font-variant-numeric: tabular-nums;
    min-width: 80px;
    text-align: right;
}

/* Arrow used for MACD delta direction */
.dir-arrow {
    font-weight: 700;
    margin-left: 6px;
    font-size: 14px;
    vertical-align: middle;
    line-height: 1;
}

/* Notifications */
.notifications-panel {
    margin-top: 24px;
}

/*----------------------------------------------------------------------------*/
/* Menu bar styles */

.menu-bar {
  display: flex;
  align-items: center;
  height: 48px;
  background: #191b1f;
  border-bottom: 1px solid #262930;
  padding: 0 32px;
}
.menu-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.menu-spacer {
  flex: 1;
}
.menu-link {
  color: #ccc;
  text-decoration: none;
  font-size: 16px;
  margin-left: 20px;
}
.menu-link:hover {
  color: #3c82f6;
}

/*----------------------------------------------------------------------------*/
/* Settings styles */

.settings-container {
  max-width: 480px;
  margin: 40px auto;
  padding: 24px;
  background: #191b1f;
  border-radius: 10px;
  box-shadow: 0 2px 12px #0004;
}
.settings-row {
  margin-bottom: 18px;
  font-size: 16px;
  color: #ccc;
  display: flex;
  align-items: center;
}
.settings-row label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.settings-row input[type="number"] {
  margin-left: 10px;
  width: 80px;
  padding: 2px 4px;
  border: 1px solid #333;
  border-radius: 4px;
  background: #23262e;
  color: #ccc;
}
.settings-row input[type="text"] {
  width: 600px;
  height: 64px;
}
