/* ServerConsole — плавающая панель серверных логов (Shift+F12). */

.server-console {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    height: 38vh;
    min-height: 220px;
    max-height: 70vh;
    z-index: 10000;
    background: rgba(18, 18, 22, 0.96);
    color: #e6e6ea;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
}

.server-console.is-open {
    display: flex;
}

.server-console .sc-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    flex: 0 0 auto;
}

.server-console .sc-title {
    font-weight: 600;
    color: var(--accent, #eac42c);
    margin-right: 8px;
}

.server-console .sc-level,
.server-console .sc-search {
    background: #1b1b20;
    color: #e6e6ea;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 3px 6px;
    font: inherit;
    outline: none;
}

.server-console .sc-level {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 20px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23c8c8cc' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'><path d='M1 1l4 4 4-4'/></svg>");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px 6px;
    cursor: pointer;
}

.server-console .sc-level option {
    background: #1b1b20;
    color: #e6e6ea;
}

.server-console .sc-search {
    flex: 1 1 auto;
    min-width: 120px;
}

.server-console .sc-search:focus,
.server-console .sc-level:focus {
    border-color: var(--accent, #eac42c);
}

.server-console .sc-btn {
    background: transparent;
    color: #c8c8cc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 3px 8px;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
}

.server-console .sc-btn svg {
    width: 14px;
    height: 14px;
}

.server-console .sc-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.server-console .sc-list {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px 8px;
    outline: none;
}

.server-console .sc-row {
    display: grid;
    grid-template-columns: 92px 52px 1fr;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
}

.server-console .sc-ts {
    color: #7a7a85;
}

.server-console .sc-lvl {
    text-transform: uppercase;
    font-size: 10px;
    padding: 1px 4px;
    border-radius: 3px;
    text-align: center;
    align-self: start;
    line-height: 1.5;
}

.server-console .sc-log   .sc-lvl { background: rgba(255, 255, 255, 0.08); color: #c8c8cc; }
.server-console .sc-info  .sc-lvl { background: rgba(80, 160, 255, 0.18); color: #7ab8ff; }
.server-console .sc-warn  .sc-lvl { background: rgba(255, 180, 60, 0.18); color: #ffc055; }
.server-console .sc-error .sc-lvl { background: rgba(255, 80, 80, 0.22);  color: #ff8a8a; }
.server-console .sc-debug .sc-lvl { background: rgba(160, 160, 160, 0.15); color: #9aa; }

.server-console .sc-error .sc-msg { color: #ffb0b0; }
.server-console .sc-warn  .sc-msg { color: #ffd79a; }

.server-console .sc-msg {
    font-family: inherit;
}
