/* ChartLabs Trader — minimal styles on top of Pico */

:root {
    --space: 0.75rem;
}

main.container { padding-top: var(--space); padding-bottom: 4rem; }

table { font-size: 0.9rem; }
table th, table td { padding: 0.3rem 0.5rem; }

.toast { padding: 0.4rem 0.8rem; background:#222; color:#fff; border-radius:4px; display:inline-block; }

article header strong a { text-decoration: none; }

@media (max-width: 600px) {
    table thead { display: none; }
    table, tbody, tr, td { display: block; width: 100%; }
    tr { border-bottom: 1px solid #ccc; padding: 0.4rem 0; }
    td { padding: 0.2rem 0.4rem; }
}

pre { white-space: pre-wrap; word-wrap: break-word; }

/* KPI grid on bot detail */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0 1rem;
}
.kpi-grid article { margin-bottom: 0; padding: 0.6rem 0.9rem; }
.kpi-grid article header { padding: 0; margin-bottom: 0.4rem; border: 0; }
.kpi-table { width: 100%; font-size: 0.85rem; margin: 0; }
.kpi-table th { text-align: left; padding: 0.15rem 0.3rem; font-weight: 500; color: var(--pico-muted-color, #666); }
.kpi-table td { text-align: right; padding: 0.15rem 0.3rem; font-variant-numeric: tabular-nums; }

/* Compact table — used by /bots and /accounts list pages when many
   benchmark KPI columns crowd the row. Smaller font + tighter padding +
   tabular numerals so columns of numbers align cleanly. */
table.compact-table { font-size: 0.78rem; }
table.compact-table th,
table.compact-table td {
    padding: 0.2rem 0.35rem;
    font-variant-numeric: tabular-nums;
}
table.compact-table th { font-weight: 500; color: var(--pico-muted-color, #666); }
table.compact-table td small { font-size: 0.85em; }


/* ═══ Theme (2026-10-14) — the Overview page's look, applied site-wide ═══════
   Soft page background, white rounded cards, quiet uppercase table headers,
   tabular numbers, a clean top bar with the current page highlighted. Pages
   keep their own markup; this only restyles the shared building blocks. */
:root {
    --ui-bg: #f5f7fa;
    --ui-card: #ffffff;
    --ui-line: #e3e8ef;
    --ui-line-soft: #eef1f5;
    --ui-muted: #6b7686;
    --ui-head: #f8fafc;
    --ui-accent: #2563eb;
    --ui-radius: 12px;
    --pico-border-radius: 8px;
}
html, body { background: var(--ui-bg); min-height: 100%; }
main.container { max-width: 1480px; padding: 1.1rem 1.6rem 4rem; }

/* Top bar */
body > nav.app-nav {
    background: var(--ui-card); border-bottom: 1px solid var(--ui-line);
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
    padding: 0 1rem; display: flex; flex-wrap: nowrap; align-items: center; gap: .6rem;
    position: sticky; top: 0; z-index: 20;
}
body > nav.app-nav ul { margin: 0; flex-wrap: nowrap; }
body > nav.app-nav > ul:first-child { flex: 0 0 auto; }
body > nav.app-nav > ul:last-child { flex: 1 1 auto; justify-content: flex-end; flex-wrap: wrap; }
body > nav.app-nav li { padding: .45rem .05rem; }
@media (max-width: 1280px) { body > nav.app-nav { flex-wrap: wrap; } }
body > nav.app-nav strong { font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; }
body > nav.app-nav button { font-size: .78rem; padding: .25rem .6rem; }
body > nav.app-nav a {
    font-size: .8rem; color: #3b4656; text-decoration: none;
    padding: .26rem .33rem; border-radius: 7px; margin: 0; white-space: nowrap;
}
body > nav.app-nav a:hover { background: var(--ui-line-soft); color: #0f172a; }
body > nav.app-nav a[aria-current="page"] { background: #e8efff; color: var(--ui-accent); font-weight: 600; }
body > nav.app-nav button { margin: 0; }

/* Headings + helper text */
main h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -.015em; margin-bottom: .6rem; }
main h3 { font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; margin: 1.4rem 0 .55rem; }
main h4 { font-size: .95rem; }
main > p > small, main > small { color: var(--ui-muted); line-height: 1.5; }

/* Cards */
main article {
    background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 1rem 1.15rem; margin-bottom: 1rem;
}
main article > header, main article > footer {
    background: transparent; margin: -1rem -1.15rem .8rem; padding: .7rem 1.15rem;
    border-bottom: 1px solid var(--ui-line-soft); border-radius: var(--ui-radius) var(--ui-radius) 0 0;
}
main article > footer { margin: .8rem -1.15rem -1rem; border-top: 1px solid var(--ui-line-soft); border-bottom: 0; }
main details { border: 1px solid var(--ui-line); border-radius: var(--ui-radius); background: var(--ui-card); padding: .55rem 1rem; }
main details summary { font-weight: 600; }

/* Tables — standalone tables become cards; tables inside cards stay flat */
main table {
    background: var(--ui-card); border: 1px solid var(--ui-line); border-radius: var(--ui-radius);
    border-collapse: separate; border-spacing: 0; overflow: hidden; font-variant-numeric: tabular-nums;
}
main table thead th, main table > tr:first-child > th {
    background: var(--ui-head); color: var(--ui-muted); font-size: .74rem; font-weight: 600;
    letter-spacing: .01em; border-bottom: 1px solid var(--ui-line);
    vertical-align: bottom;
}
main table td { border-bottom: 1px solid var(--ui-line-soft); background: transparent; }
main table tbody tr:last-child td { border-bottom: 0; }
main table tbody tr:hover td { background: #f9fbfd; }
main article table, main details table, .kpi-grid table, .dh table, main table table {
    background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible;
}
main article table thead th, .dh table thead th { background: transparent; }

/* Buttons + form fields: smaller and softer than Pico's defaults */
main button, main [role="button"], main input[type="submit"] {
    border-radius: 8px; font-size: .85rem; padding: .42rem .9rem;
}
main input:not([type="checkbox"]):not([type="radio"]), main select, main textarea {
    border-radius: 8px; font-size: .88rem; padding: .42rem .65rem; height: auto;
}
main label { font-size: .85rem; }
main fieldset { border: 1px solid var(--ui-line); border-radius: var(--ui-radius); padding: .6rem 1rem; background: var(--ui-card); }
main code { border-radius: 5px; font-size: .8em; }
main img { border-radius: 10px; }
main form button[type="submit"], main form input[type="submit"], main form [role="button"] { width: auto; }
main form > label, main form > fieldset { max-width: 34rem; }
main form > .grid > label { margin-bottom: .4rem; }
@media (max-width: 720px) {
    main.container { padding: .8rem .7rem 3rem; }
    body > nav.app-nav { padding: 0 .5rem; gap: .2rem; }
    main article { padding: .8rem .85rem; }
}
