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

:root{
    --bg:#1b1b1b;
    --bg2:#242424;
    --bg3:#2d2d2d;
    --panel:#262626;
    --border:#505050;
    --green:#97ba73;
    --green2:#719b54;
    --yellow:#d2bb71;
    --red:#c66a6a;
    --blue:#83aac8;
    --text:#d5d5d5;
    --muted:#8f8f8f;
    --accent:#97ba73;
}

html,body{
    height:100%;
    background:var(--bg);
    color:var(--text);
    font-family:'IBM Plex Mono',monospace;
    font-size:12px;
}

.panel{
    background:#242424;
    border:2px solid #4c4c4c;
    padding:6px;
}

/* ─── Toolbar ─── */
.toolbar{
    display:flex;gap:6px;align-items:center;flex-wrap:wrap;
    padding:6px 8px;background:#242424;border:2px solid #4c4c4c;
    margin-bottom:8px;
}

.toolbar label{
    font-size:10px;color:var(--muted);
}

.toolbar input[type="checkbox"]{
    accent-color:var(--accent);width:13px;height:13px;cursor:pointer;
}

.toolbar input[type="text"]{
    flex:1;min-width:120px;padding:3px 6px;
    background:#181818;border:1px solid #4b4b4b;
    color:white;font-family:inherit;font-size:11px;
}

.toolbar input[type="text"]:focus{
    outline:none;border-color:var(--green);
}

/* ─── Buttons ─── */
.btn{
    padding:3px 8px;border:2px solid #555;
    background:#343434;color:#ddd;
    cursor:pointer;font-family:inherit;
    font-size:10px;transition:.15s;
    display:inline-flex;align-items:center;gap:3px;
}

.btn:hover{border-color:var(--green);background:#42513a}

.btn-primary{
    background:#364130;border-color:var(--green);color:#d8ffb2;
}

.btn-primary:hover{background:#42513a}

.btn-sm{padding:2px 6px;font-size:9px}

/* ─── Dropdown ─── */
.dropdown{position:relative;display:inline-block}
.dropdown-btn{
    background:#303030;border:2px solid #555;color:#ddd;
    padding:3px 8px;cursor:pointer;font-family:inherit;
    font-size:10px;transition:.15s;display:inline-flex;
    align-items:center;gap:4px;white-space:nowrap;
}
.dropdown-btn:hover{border-color:var(--green);background:#42513a}
.dropdown-btn.open{border-color:var(--green);background:#364130}
.dropdown-btn .arrow{font-size:8px;opacity:.6}
.dropdown-menu{
    position:absolute;top:100%;left:0;z-index:10;
    background:#2d2d2d;border:2px solid #555;
    min-width:160px;max-height:240px;overflow-y:auto;
    display:none;margin-top:2px;
}
.dropdown-menu.show{display:block}
.dropdown-item{
    display:flex;align-items:center;gap:6px;
    padding:4px 8px;font-size:10px;cursor:pointer;
    color:var(--muted);transition:.1s;user-select:none;
}
.dropdown-item:hover{background:#383838;color:var(--text)}
.dropdown-item.selected{color:var(--green)}
.dropdown-item .check{width:12px;text-align:center;font-size:9px}
.dropdown-overlay{
    position:fixed;top:0;left:0;right:0;bottom:0;z-index:9;
}

/* ─── Level filter inline ─── */
.level-filter{
    display:flex;align-items:center;gap:4px;
}
.level-filter label{
    display:flex;align-items:center;gap:2px;
    cursor:pointer;user-select:none;margin:0;
}

/* ─── Spinner ─── */
.spinner{
    width:10px;height:10px;border:2px solid #555;
    border-top-color:var(--green);border-radius:50%;
    animation:spin .6s linear infinite;display:inline-block;
}

@keyframes spin{to{transform:rotate(360deg)}}

/* ─── Table ─── */
.table-wrapper{
    flex:1;overflow-y:auto;
}

.table{width:100%;border-collapse:collapse;font-size:10px}

.table th{
    background:#303030;
    padding:3px 4px;
    border-bottom:2px solid #555;
    text-align:left;
    color:#98c06f;
    font-size:9px;
    letter-spacing:.5px;
    position:sticky;top:0;z-index:1;
}

.table td{
    padding:2px 4px;
    border-bottom:1px solid #383838;
}

.table tbody tr{transition:.1s}
.table tbody tr:hover{background:#32382d}

.table .row-error td{background:rgba(198,106,106,.08)}
.table .row-warn td{background:rgba(210,187,113,.06)}

/* ─── Level colors ─── */
.level{font-weight:700}
.lv-critical,.lv-error{color:#d77c7c}
.lv-warning{color:#d6bf66}
.lv-information{color:#8fd76a}
.lv-debug{color:#8db7d7}
.lv-trace{color:#6a6a6a}

/* ─── Source / Category ─── */
.src-short{color:#83aac8;margin-right:2px;font-size:10px}
.cat-short{color:#6a8a6a;font-size:10px;cursor:help}
.msg-text{white-space:pre-wrap;word-break:break-word}

/* ─── Details ─── */
details summary{cursor:pointer;font-size:10px;color:var(--red)}
details pre{
    background:#181818;padding:4px;border:2px solid #4b4b4b;
    font-size:9px;max-height:120px;overflow:auto;margin-top:2px;
}

/* ─── Status bar ─── */
.status-bar{
    margin-bottom:4px;font-size:10px;color:var(--muted);
}

/* ─── Empty state ─── */
.empty-state{text-align:center;padding:16px;color:var(--muted)}
.empty-state h3{margin:0 0 4px;color:var(--text)}

/* ─── Footer load ─── */
.load-more-row td{text-align:center;padding:8px}
.end-row td{text-align:center;padding:8px;font-size:10px;color:var(--muted)}

/* ─── Log container ─── */
.log-container{
    display:flex;flex-direction:column;
    height:calc(100vh - 80px);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar{width:4px;height:4px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#444;border-radius:0}
::-webkit-scrollbar-thumb:hover{background:#555}
