:root {
    --bg: #0b0e11; /* Binance-style dark */
    --card-bg: #1e2329;
    --text-main: #eaecef;
    --text-muted: #848e9c;
    --accent: #fcd535; /* Crypto Yellow */
    --border: #2b3139;
    --row-hover: #2b3139;
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        sans-serif;
    padding: 10px;
}

.dashboard-container {
    max-width: 1100px;
    margin: 0 auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

h1,
h2,
h3 {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
}
h1 {
    font-size: 1.2rem;
}
h2 {
    font-size: 1rem;
}
h3 {
    font-size: 0.9rem;
}

/* Hero Stat (The big Net Exposure) */
.hero-stat {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.hero-stat .stat-value.highlighted {
    font-size: 2.5rem;
    color: var(--accent);
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
}

/* Stat Grid */
.stat-grid {
    display: grid;
    /* This is the 'magic' line for responsive grids */
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
    background: transparent;
    padding: 0;
}

.stat-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.25rem;
    font-family: "JetBrains Mono", "Roboto Mono", monospace;
    color: var(--text-main);
    letter-spacing: -0.5px; /* Tighter look for numbers */
}

/* Table styling */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff1;
    border-radius: 8px;
    overflow: hidden;
}

th {
    background: #2b3139;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 12px 16px;
    text-align: left;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
}
/* Ensure the Instrument name has enough space */
td:first-child {
    font-weight: 500;
    color: var(--text-muted);
}
/* Right-align numeric columns in the table */
th.num,
td.num {
    text-align: right;
    font-variant-numeric: tabular-nums; /* Forces every digit to be the same width */
}

tr:hover {
    background: var(--row-hover);
}
.total-row td.num {
    color: var(--accent);
    border-top: 1px solid var(--border);
}
.total-row td {
    color: var(--accent);
    font-weight: bold;
    border-top: 2px solid var(--border);
}

/* Details/Summary styling */
details {
    background: var(--card-bg);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

summary {
    cursor: pointer;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    padding: 8px 0;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

summary:hover {
    color: var(--accent);
}

summary:hover .summary-delta {
    color: var(--accent);
}

.summary-delta {
    color: var(--accent);
    font-family: "JetBrains Mono", monospace;
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: normal;
}
