/* step-bot admin — минимальный CSS. Тёмная тема. */

* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #1a1d23;
    color: #e8eaed;
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* ─────── Topbar ─────── */
.topbar {
    background: #0f1115;
    border-bottom: 2px solid #2a2d33;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar.mode-mainnet { border-bottom-color: #d94040; }
.topbar.mode-demo { border-bottom-color: #40a060; }

.topbar-left { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.logo { font-size: 18px; font-weight: 700; color: #ffb020; text-decoration: none; }

.mode-badge, .symbol-badge, .dryrun-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background: #2a2d33;
}
.mode-mainnet .mode-badge { background: #4a1818; color: #ff8080; }
.mode-demo .mode-badge { background: #184a28; color: #80ff90; }
.dryrun-badge { background: #4a3a18; color: #ffd080; }

.topbar-nav { display: flex; gap: 15px; flex-wrap: wrap; }
.topbar-nav a {
    color: #a0a4ab;
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 4px;
    transition: background 0.15s;
}
.topbar-nav a:hover { background: #2a2d33; color: #fff; }

/* ─────── Content ─────── */
.content {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

h1 { margin: 10px 0 20px; font-size: 24px; }
h2 { margin: 0 0 15px; font-size: 16px; color: #ffb020; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.card {
    background: #22262c;
    border: 1px solid #2d3139;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 15px;
}

.error-card { border-color: #d94040; }
.warning-card { border-color: #d9a040; }
.confirm-card { border-color: #ffb020; background: #2a241a; }

/* ─────── Tables ─────── */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 6px 10px 6px 0; border-bottom: 1px solid #2a2d33; vertical-align: top; }
.kv td:first-child { color: #a0a4ab; width: 40%; font-size: 13px; }
.kv tr:last-child td { border-bottom: none; }
.kv .total-row td { border-top: 2px solid #ffb020; padding-top: 10px; }

.data { width: 100%; border-collapse: collapse; font-size: 13px; }
.data th {
    background: #2a2d33;
    padding: 8px 12px;
    text-align: left;
    color: #ffb020;
    font-weight: 600;
    border-bottom: 2px solid #ffb020;
}
.data td { padding: 8px 12px; border-bottom: 1px solid #2a2d33; }
.data tr.status-active td { background: #182028; }
.data tr.status-closed_tp td { color: #80ff90; }

/* ─────── Utility ─────── */
.big-number { font-size: 32px; font-weight: 700; margin: 5px 0; color: #80ff90; }
.unit { font-size: 16px; color: #a0a4ab; font-weight: 400; }
.muted { color: #808790; font-style: italic; }
.error { color: #ff8080; }
.positive { color: #80ff90; }
.negative { color: #ff8080; }
.mainnet { color: #ff8080; }
.demo { color: #80ff90; }

code { background: #0f1115; padding: 2px 6px; border-radius: 3px; font-size: 12px; }
pre { background: #0f1115; padding: 15px; border-radius: 4px; overflow-x: auto; font-size: 12px; }
pre.logs { max-height: 70vh; overflow-y: auto; white-space: pre-wrap; word-break: break-all; }

/* ─────── Form inputs ─────── */
.edit-form input, .edit-form select {
    background: #0f1115;
    color: #e8eaed;
    border: 1px solid #353940;
    border-radius: 4px;
    padding: 7px 10px;
    font-size: 14px;
    font-family: inherit;
    min-width: 200px;
}
.edit-form input:focus, .edit-form select:focus {
    outline: none;
    border-color: #ffb020;
    box-shadow: 0 0 0 2px rgba(255,176,32,0.2);
}
.edit-form label { cursor: pointer; }

/* ─────── Buttons ─────── */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #2a2d33;
    color: #e8eaed;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
}
.btn:hover { background: #353940; }
.btn-primary { background: #ffb020; color: #000; font-weight: 600; }
.btn-primary:hover { background: #ffc040; }
.btn-danger { background: #d94040; color: #fff; font-weight: 600; }
.btn-danger:hover { background: #e85050; }

/* ─────── Events ─────── */
.events { list-style: none; padding: 0; margin: 0; }
.events li {
    padding: 6px 10px;
    border-left: 3px solid #a0a4ab;
    margin-bottom: 4px;
    font-size: 13px;
    display: flex;
    gap: 12px;
}
.events li.event-info { border-left-color: #4080c0; }
.events li.event-warning { border-left-color: #ffb020; }
.events li.event-error { border-left-color: #d94040; }
.events .ts { color: #808790; font-family: monospace; font-size: 11px; min-width: 160px; }

/* ─────── Footer ─────── */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: #606870;
    font-size: 12px;
}
