:root {
    color-scheme: dark;

    --background: #0b1017;
    --panel: #121a24;
    --panel-soft: #172230;
    --border: #263445;

    --text: #edf3f8;
    --muted: #93a4b5;

    --good: #60d394;
    --bad: #ff7b7b;
    --warn: #f3c969;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);
    background: var(--background);
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 24px;

    padding: 22px 28px;

    border-bottom:
        1px solid var(--border);

    background:
        rgba(11, 16, 23, 0.95);
}

h1 {
    margin: 0;

    font-size: 24px;
}

.subtitle {
    margin-top: 5px;

    color: var(--muted);
}

.status {
    align-self: center;

    color: var(--muted);

    text-align: right;
    line-height: 1.5;
}

.status-running {
    color: var(--good);
}

.status-stale {
    color: var(--warn);
}

main {
    max-width: 1500px;

    margin: 0 auto;

    padding: 24px;
}

.portfolio-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(500px, 1fr)
        );

    gap: 24px;
}

.portfolio {
    overflow: hidden;

    border:
        1px solid var(--border);

    border-radius: 16px;

    background: var(--panel);
}

.portfolio-header {
    padding: 20px 22px;

    border-bottom:
        1px solid var(--border);
}

.portfolio-title {
    margin: 0;

    font-size: 21px;
}

.objective-main {
    margin-top: 16px;

    font-size: 34px;
    font-weight: 700;
}

.return {
    margin-top: 5px;

    font-size: 17px;
    font-weight: 600;
}

.good {
    color: var(--good);
}

.bad {
    color: var(--bad);
}

.neutral {
    color: var(--muted);
}

.metrics {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 1px;

    background: var(--border);
}

.metric {
    padding: 16px 20px;

    background: var(--panel-soft);
}

.metric-label {
    margin-bottom: 6px;

    color: var(--muted);

    font-size: 13px;
}

.metric-value {
    font-size: 18px;
    font-weight: 600;
}

.section {
    padding: 20px 22px;

    border-top:
        1px solid var(--border);
}

.section h3 {
    margin:
        0
        0
        15px;

    font-size: 16px;
}

.chart-box {
    height: 260px;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding:
        9px
        8px;

    border-bottom:
        1px solid var(--border);

    text-align: right;

    font-size: 13px;
}

th:first-child,
td:first-child {
    text-align: left;
}

th {
    color: var(--muted);

    font-weight: 500;
}

.execution {
    padding:
        12px
        0;

    border-bottom:
        1px solid var(--border);
}

.execution:last-child {
    border-bottom: 0;
}

.execution-time {
    color: var(--muted);

    font-size: 12px;
}

.execution-items {
    margin-top: 6px;

    line-height: 1.6;

    font-size: 13px;
}

.buy {
    color: var(--good);
}

.sell {
    color: var(--bad);
}

footer {
    padding: 25px;

    color: var(--muted);

    text-align: center;

    font-size: 12px;
}

@media (
    max-width: 700px
) {
    .topbar {
        padding: 16px;

        flex-direction: column;
    }

    .status {
        text-align: left;
    }

    main {
        padding: 12px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .metrics {
        grid-template-columns: 1fr;
    }

    .objective-main {
        font-size: 27px;
    }
}
