html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    background: #0d1117;
    color: #c9d1d9;
    font: 13px/1.4 "Segoe UI", system-ui, sans-serif;
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    background: #161b22;
    border-bottom: 1px solid #21262d;
    flex-wrap: wrap;
}

.toolbar h1 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 8px 0 0;
    color: #e6edf3;
    white-space: nowrap;
}

.toolbar label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #8b949e;
    white-space: nowrap;
}

.toolbar input {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: inherit;
    padding: 4px 8px;
    font: inherit;
}

.toolbar input:focus {
    outline: none;
    border-color: #2f81f7;
}

.toolbar input[type="number"] {
    width: 80px;
}

.toolbar input[type="search"] {
    width: 220px;
}

.toolbar button {
    background: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    padding: 4px 12px;
    font: inherit;
    cursor: pointer;
}

.toolbar button:hover {
    background: #30363d;
}

.toolbar button.accent {
    background: #238636;
    border-color: #2ea043;
    color: #fff;
}

.toolbar button.accent:hover {
    background: #2ea043;
}

.toolbar button.danger {
    border-color: #f85149;
    color: #f85149;
}

.toolbar button.danger:hover {
    background: #da3633;
    border-color: #f85149;
    color: #fff;
}

.row-count {
    margin-left: auto;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.row-count.error {
    color: #f85149;
    opacity: 1;
}

/* AG Grid needs a sized container */
#grid {
    flex: 1 1 auto;
    min-height: 0;
}

/* PnL coloring, applied via cellClassRules in app.js */
.cell-pos {
    color: #3fb950;
}

.cell-neg {
    color: #f85149;
}

.toolbar button.active {
    border-color: #e3b341;
    color: #e3b341;
}

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

/* category ✓/—/? flags, colored via cellClassRules in app.js */
.bool-cell {
    text-align: center;
}

.star {
    cursor: pointer;
    color: #8b949e;
    font-size: 14px;
}

.star:hover {
    color: #e3b341;
}

.star.starred {
    color: #e3b341;
}

.trader-link {
    color: #58a6ff;
    text-decoration: none;
}

.trader-link:hover {
    text-decoration: underline;
}
