:root {
    --km-sidebar: #15202e;
    --km-accent: #2f80ed;
}

body { background: #f3f5f8; font-size: .925rem; }

.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px; flex-shrink: 0; background: var(--km-sidebar); color: #cfd8e3;
    position: sticky; top: 0; height: 100vh; padding: 1rem .75rem; overflow-y: auto;
}
.sidebar .brand { color: #fff; font-weight: 700; font-size: 1.1rem; text-decoration: none; padding: .25rem .5rem 1rem; display: block; }
.sidebar .brand i { color: var(--km-accent); }
.sidebar .nav { list-style: none; padding: 0; }
.sidebar .nav-link { color: #b8c4d3; border-radius: .4rem; padding: .45rem .65rem; display: flex; gap: .55rem; align-items: center; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar .nav-link.active { background: var(--km-accent); color: #fff; }
.sidebar .nav-section { text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; color: #6c7c90; padding: 1rem .65rem .35rem; }
.sidebar .user-box { border-top: 1px solid rgba(255,255,255,.08); padding: .75rem .5rem 0; }

.content { flex: 1; padding: 1.5rem 2rem; min-width: 0; }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.4rem; margin: 0; font-weight: 600; }

.card { border: 0; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08); }
.card-header { background: #fff; font-weight: 600; }

.stat { padding: 1rem 1.25rem; }
.stat .num { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.stat .lbl { color: #6c757d; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #adb5bd; vertical-align: middle; }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.18); }
.dot.off { background: #adb5bd; }

.table > :not(caption) > * > * { padding: .55rem .65rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: #6c757d; font-weight: 600; }
.table-hover tbody tr { cursor: default; }

pre.output {
    background: #0f172a; color: #e2e8f0; padding: .85rem 1rem; border-radius: .4rem; max-height: 480px; overflow: auto;
    font-size: .8rem; white-space: pre-wrap; word-break: break-word; margin: 0;
}
textarea.code, .code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }

.bulk-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #e5e7eb; padding: .75rem 1rem; z-index: 5; }

.screenshot { max-width: 100%; border-radius: .4rem; border: 1px solid #dee2e6; background: #000; }

.kv th { width: 38%; color: #6c757d; font-weight: 500; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #15202e, #1f3a5f); }
.login-card { width: 100%; max-width: 380px; }

@media (max-width: 900px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; }
    .content { padding: 1rem; }
}
