* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #1f2933;
}
.topbar {
    background: #fff;
    border-bottom: 1px solid #d9dee5;
    padding: 22px 28px;
}
.topbar h1 { margin: 0 0 4px; font-size: 25px; }
.topbar p { margin: 0; color: #68737d; }
.container { max-width: 1400px; margin: 24px auto; padding: 0 18px 40px; }
.card {
    background: #fff;
    border: 1px solid #dce1e7;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
h2 { margin-top: 0; font-size: 20px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 12px; }
input, select, button {
    font: inherit;
    border: 1px solid #b8c0c8;
    border-radius: 6px;
    padding: 9px 11px;
}
input[type=search] { flex: 1; min-width: 240px; }
button { background: #fff; cursor: pointer; }
button:hover { background: #f1f4f7; }
button.primary { background: #20262d; color: #fff; border-color: #20262d; }
button:disabled { opacity: .5; cursor: default; }
.muted { color: #68737d; }
.status.ok { color: #116329; }
.status.error { color: #9f1c1c; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; vertical-align: top; padding: 9px 8px; border-bottom: 1px solid #e4e7eb; }
th { font-size: 13px; color: #52606d; background: #fafbfc; }
code { background: #f0f2f4; padding: 2px 5px; border-radius: 4px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.progress { width: 180px; height: 9px; background: #e3e7eb; border-radius: 999px; overflow: hidden; margin-top: 5px; }
.progress > div { height: 100%; background: #303a44; width: 0; }
pre {
    margin: 0;
    padding: 14px;
    background: #111820;
    color: #e9eef3;
    border-radius: 7px;
    overflow: auto;
    max-height: 520px;
    white-space: pre-wrap;
}
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    max-width: 520px;
    background: #20262d;
    color: #fff;
    padding: 12px 16px;
    border-radius: 7px;
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
@media (max-width: 700px) {
    .toolbar { flex-direction: column; }
    input[type=search] { min-width: 0; }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}
.stats-grid > div {
    border: 1px solid #dce1e7;
    border-radius: 8px;
    padding: 14px;
    background: #fafbfc;
}
.stats-grid strong {
    display: block;
    font-size: 24px;
    margin-bottom: 4px;
}
.stats-grid span {
    color: #68737d;
}
