/* TradePanel Styles — dark theme, clean trading UI */
:root {
    --bg: #0f1117;
    --surface: #1a1d27;
    --border: #2a2d3a;
    --text: #e1e4e8;
    --text-dim: #8b949e;
    --green: #3fb950;
    --red: #f85149;
    --blue: #58a6ff;
    --yellow: #d2991d;
    --accent: #7c3aed;
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

header h1 { font-size: 1.3rem; }
.header-right { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dim); }
.sep { color: var(--border); }

.dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot.yellow { background: var(--yellow); }

/* Tab navigation */
.tabs { display:flex; gap:4px; padding:8px 24px; background:var(--surface); border-bottom:1px solid var(--border); }
.tab-btn { background:none; border:none; color:var(--text-dim); padding:8px 18px; cursor:pointer; border-radius:6px; font-size:.9rem; transition:all .15s; }
.tab-btn:hover { background:var(--border); color:var(--text); }
.tab-btn.active { background:var(--accent); color:white; }
.tab-content { animation:fadeIn .2s; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

/* Same look for the <nav> tab buttons (dashboard.html uses .tab) */
nav { display:flex; flex-wrap:wrap; gap:4px; padding:8px 24px; background:var(--surface); border-bottom:1px solid var(--border); }
.tab { background:none; border:none; color:var(--text-dim); padding:9px 16px; cursor:pointer; border-radius:6px; font-size:.9rem; transition:all .15s; }
.tab:hover { background:var(--border); color:var(--text); }
.tab.active { background:var(--accent); color:white; }

/* 🤖 AI Desk */
.hint { color:var(--text-dim); font-size:.8rem; margin-top:8px; line-height:1.5; }
.agent-list { list-style:none; padding:0; margin:8px 0; }
.agent-list li { padding:4px 0; font-size:.85rem; border-bottom:1px solid var(--border); }
.verdict-badge { margin:8px 0 12px; }
.verdict-badge .badge { font-size:1rem; padding:6px 16px; }
.verdict-text { font-size:.9rem; line-height:1.6; margin-bottom:10px; white-space:pre-wrap; }
details summary { cursor:pointer; color:var(--blue); font-size:.85rem; padding:6px 0; }
h3 { font-size:.9rem; margin:14px 0 6px; color:var(--text-dim); }
pre { white-space:pre-wrap; word-wrap:break-word; font-family:inherit; font-size:.85rem;
      background:var(--bg); border:1px solid var(--border); border-radius:6px; padding:10px; line-height:1.6; }
main a { color:var(--blue); }
h2 { font-size:1rem; }


main {
    flex: 1;
    padding: 20px 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 16px;
}

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

.card h2 {
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: var(--blue);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
td {
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
}
td:last-child { text-align: right; }
.ver { color: var(--text-dim); font-size: 0.75rem; }
.mini-table { font-size: 0.8rem; }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge.green { background: rgba(63,185,80,0.15); color: var(--green); }
.badge.red { background: rgba(248,81,73,0.15); color: var(--red); }
.badge.blue { background: rgba(88,166,255,0.15); color: var(--blue); }

.wallet-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 12px;
    background: var(--bg);
}
.wallet-card h3 { font-size: 0.95rem; margin-bottom: 6px; }
.wallet-address { font-family: monospace; font-size: 0.75rem; color: var(--text-dim); }
.wallet-balance { font-size: 1.5rem; font-weight: 700; color: var(--green); margin: 8px 0; }

.position-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.85rem;
}
.position-row .pnl-pos { color: var(--green); }
.position-row .pnl-neg { color: var(--red); }

footer {
    padding: 8px 24px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
}

/* Plugin form styles */
.plugin-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.plugin-form label {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: -8px;
}
.plugin-form input[type="range"] { width: 100%; }
.plugin-form input[type="text"],
.plugin-form select {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}
.plugin-form button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 600;
    margin-top: 8px;
}
.plugin-form button:hover { opacity: 0.9; }

/* Responsive */
@media (max-width: 600px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    header { flex-direction: column; gap: 8px; }
    nav { padding: 8px 12px; gap: 4px; }
    .tab { padding: 6px 10px; font-size: 0.8rem; }
}
