/* Minimal black layer (style 1). Loaded last: keeps the black theme colours and
   every field, removes boxes, shadows, uppercase headings and uneven spacing. */
:root{--min-line:#242424;--min-row:#161616;--min-muted:#858585;--min-soft:#b8b8b8}
html,body{background:#000}

/* Sidebar: quiet list, one highlight. */
.sidebar{background:#000;border-right:1px solid var(--min-line)}
.brand-mark{background:#f5f5f5;color:#000;box-shadow:none;border-radius:8px}
.nav-group{color:#555;font-size:10px;letter-spacing:.12em}
.nav-btn{color:var(--min-muted);font-size:13px;font-weight:500;padding:8px 10px}
.nav-btn:hover{background:#0c0c0c;color:#f5f5f5}
.nav-btn.active{background:#111;color:#fff;box-shadow:none}
.sidebar-foot{border-top:1px solid var(--min-line);color:var(--min-muted)}

/* Top bar: flat. */
.topbar{background:#000;backdrop-filter:none;border-bottom:1px solid var(--min-line)}
.mode.paper{background:none;border:1px solid var(--min-line);color:var(--min-soft);border-radius:4px;font-weight:600}

/* Page rhythm: one left edge and one title size on every page. */
body .page{padding:22px 28px 48px}
body .page:has(.potential-layout),body .page:has(.dashboard-potential-card){padding-left:28px;padding-right:28px}
body .page-head{margin:0 0 18px}
@media(min-width:781px){body .page-head{align-items:flex-end}}
body .page-head h1{font-size:20px;font-weight:600;letter-spacing:-.01em}
body .page-head p{font-size:12px;color:var(--min-muted);margin-top:3px}
body .sep{height:18px}

/* Cards become plain sections: no fill, border, radius or shadow. */
body .card{background:transparent;border:0;border-radius:0;box-shadow:none;overflow:visible}
body .card-head{min-height:0;padding:0 0 8px;border-bottom:0}
body .card-head h3{font-size:13px;font-weight:500;color:var(--min-soft)}
body .card-head small{font-size:12px;color:var(--min-muted)}
body .card-body{padding:0}

/* Metric grids become one strip of numbers between two thin lines. */
body .grid:has(> .metric){display:flex;flex-wrap:wrap;gap:0;border-top:1px solid var(--min-line);border-bottom:1px solid var(--min-line)}
body .grid > .metric{flex:1 1 150px;padding:12px 22px 12px 0;margin-right:22px;border-right:1px solid var(--min-row)}
body .grid > .metric:last-child{border-right:0;margin-right:0}
body .metric .label{font-size:11px;text-transform:none;letter-spacing:0;color:var(--min-muted)}
body .metric .value{font-size:22px;font-weight:600;margin:2px 0 1px;letter-spacing:-.01em}
body .metric .detail{font-size:11px;color:var(--min-muted)}

/* Tables: quiet one-line headers, thin row lines, numbers aligned. */
body .table{font-variant-numeric:tabular-nums}
body .table th,body .table-wrap > table.table.table > thead > tr > th,body .dashboard-potential-card .table th{background:#000;color:var(--min-muted);font-size:11px;font-weight:400;text-transform:none;letter-spacing:0;border-bottom:1px solid var(--min-line);white-space:normal;overflow-wrap:break-word;word-break:normal;hyphens:auto;line-height:1.3;vertical-align:bottom;padding-left:4px;padding-right:4px}
body .table td,body .table-wrap > table.table.table > tbody > tr > td{border-bottom:1px solid var(--min-row)}
body .table tr:hover td{background:#0a0a0a}
body .table .sub,body .table-wrap > table.table.table .sub{color:var(--min-muted);font-size:11px;margin-top:2px}
body .empty{color:var(--min-muted);font-size:12px}

/* Badges: text colour only. */
body .badge{background:none;padding:0;font-weight:600}

/* Notices: a thin left rule instead of a coloured box. */
body .notice,body .notice.blue,body .notice.red{background:none;border:0;border-left:2px solid #444;border-radius:0;padding:2px 10px;color:var(--min-soft);font-size:12px}
body .notice.red{border-left-color:var(--red)}
body .notice:not(.blue):not(.red){border-left-color:var(--amber)}

/* Buttons: outline, one filled primary. */
body .btn,body .btn.ghost,body .icon-btn{background:none;border:1px solid var(--min-line);color:#e5e5e5;border-radius:6px;font-size:12px;font-weight:500}
body .btn:hover,body .btn.ghost:hover,body .icon-btn:hover{background:#111;border-color:#3a3a3a}
body .btn.primary{background:#f5f5f5;border-color:#f5f5f5;color:#000}
body .btn.danger{background:none;border-color:#4a2328;color:var(--red)}
body .tab{background:none;border:0;color:var(--min-muted);font-size:12px}
body .tab.active{background:#141414;color:#fff}

/* Small helper text stays readable everywhere. */
body .page .sub{font-size:11px;color:var(--min-muted)}
/* Search and status chip: flat. */
.topbar input,.topbar #symbolJump{background:#000;border:1px solid var(--min-line);font-size:12px;height:30px;padding:5px 10px;border-radius:6px}
.status-chip,.status-chip.good,.status-chip.bad{background:none;font-size:12px}
details > summary{color:var(--min-soft);font-size:12px;cursor:pointer}

@media(max-width:760px){
 body .page{padding:16px 14px 40px}
 body .page-head{align-items:flex-start}
 body .grid:has(> .metric){display:grid;grid-template-columns:1fr 1fr}
 body .grid > .metric{margin:0;padding:10px 0;border-right:0;border-bottom:1px solid var(--min-row)}
 body .metric .value{font-size:18px}
}
@media(max-width:600px){
 body .page .table tr{background:none;border:0;border-bottom:1px solid var(--min-line);border-radius:0;margin:0;padding:10px 0}
 body .page .table td::before{text-transform:none;letter-spacing:0;font-size:11px}
}
/* Filters and inputs on one scale with the rest of the page. */
body .page select,body .page input:not([type="checkbox"]):not([type="radio"]){background:#000;border:1px solid var(--min-line);border-radius:6px;font-size:13px;min-height:34px;padding:6px 10px;color:#e5e5e5}
/* The year-long backtest curve fits the screen on desktop; phones keep scrolling. */
@media(min-width:781px){.journal-chart[data-journal-chart="imported"] .journal-chart-svg{flex:1 1 auto;min-width:0;width:100%}}
