* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: #0f1419;
  color: #e7ecf3;
  line-height: 1.45;
}
.hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #243044;
  background: linear-gradient(180deg, #151c26 0%, #0f1419 100%);
}
.hdr h1 { margin: 0; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.sub { margin: 0.35rem 0 0; color: #9fb0c8; font-size: 0.92rem; }
.meta { text-align: right; color: #9fb0c8; font-size: 0.85rem; }
.meta button {
  margin-left: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #e2e8f0;
  cursor: pointer;
}
.meta button:hover { background: #334155; }

.panel {
  margin: 1rem 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid #243044;
  border-radius: 12px;
  background: #121922;
}
.panel h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.panel h3 { margin: 1rem 0 0.5rem; font-size: 0.95rem; color: #cbd5e1; }

.grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr; }
}

.kpis { display: flex; gap: 1rem; flex-wrap: wrap; margin: 0.5rem 0 1rem; }
.kpi {
  min-width: 120px;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: #0b1017;
  border: 1px solid #243044;
}
.kpi .lbl { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: #94a3b8; }
.kpi .val { font-size: 1.15rem; font-weight: 650; margin-top: 0.2rem; }

.tbl { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tbl th, .tbl td { padding: 0.45rem 0.5rem; border-bottom: 1px solid #1e293b; text-align: left; }
.tbl th { color: #94a3b8; font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }

.muted { color: #94a3b8; font-size: 0.85rem; }
.warn { color: #fbbf24; }
.hidden { display: none; }
pre { background: #0b1017; padding: 0.75rem; border-radius: 8px; overflow: auto; font-size: 0.78rem; border: 1px solid #243044; }

#chart-pnl { max-height: 320px; }
