:root {
    --bg: #0d1117;
    --surface: #161b22;
    --border: #30363d;
    --text: #f0f6fc;
    --muted: #8b949e;
    --profit: #3fb950;
    --loss: #f85149;
    --accent: #58a6ff;
    --warning: #d29922;
    --ml: #a371f7;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.5;
}

.mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.muted { color: var(--muted); }
.profit { color: var(--profit); }
.loss { color: var(--loss); }

/* Layout */
.container { max-width: 1280px; margin: 0 auto; padding: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row { display: flex; justify-content: space-between; align-items: center; }

/* Navbar */
.navbar {
    background: rgba(22, 27, 34, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar .logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent), var(--ml));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
}

.navbar .title { font-weight: 700; font-size: 18px; }
.navbar .subtitle { font-size: 11px; color: var(--muted); margin-top: -2px; }

.nav-links { display: flex; gap: 8px; }
.nav-link {
    color: var(--muted);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s;
}
.nav-link:hover, .nav-link.active { background: var(--surface); color: var(--text); }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
}

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}
.card-link:hover { transform: translateY(-2px); border-color: var(--accent); }

.card-title { font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-value { font-size: 32px; font-weight: 800; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Status */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.status-active { background: var(--profit); box-shadow: 0 0 8px var(--profit); }
.status-stopped { background: var(--loss); }
.status-warning { background: var(--warning); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-profit { background: rgba(63, 185, 80, 0.15); color: var(--profit); }
.badge-loss { background: rgba(248, 81, 73, 0.15); color: var(--loss); }
.badge-accent { background: rgba(88, 166, 255, 0.15); color: var(--accent); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; }
.table tr:hover { background: rgba(88, 166, 255, 0.05); }

/* Forms */
.input {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    margin: 8px 0 16px;
}
.input:focus { outline: none; border-color: var(--accent); }

.btn {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn:hover { background: #4a9eff; }

/* Chart container */
.chart-container { height: 200px; margin-top: 16px; }

/* Responsive */
@media (max-width: 900px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .navbar { flex-direction: column; gap: 12px; }
}
