﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
}

.webgpu-warn {
    background: #ff6600;
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    text-align: center;
    font-family: monospace;
}

.panel.row{
        display: flex;
        flex-direction: row;
        gap:0.4em;
        align-items: center;
    }
.panel.colum{
        display: flex;
        flex-direction: column;    
        gap:0.4em;
    }
 


/* #### Grid */
.container {
    display: flex;
    height: 100vh;
}
.main {
    flex: 1;
    padding: 2px;
    overflow-y: auto;
    min-width: 0;
}


/* ##### General Styling */
/* Для HTML5 элементов */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
    display: block;
}

body {
    line-height: 1;
}

ol, ul {
    list-style: none;
}

blockquote, q {
    quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
    content: '';
    content: none;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

body {
    display: flex;
    flex-direction: column;
    gap:2em;
    background-color: #000000;
    color: #F0F0F0;
    font-family: Arial, sans-serif;
   /*  margin: 3.2em 0 0 1em; */

}

h1, h2, h3 {
    color: #FFFFFF; /* White for headings */
}



/* ############# scrollbar */

.scroll-container {
  overflow: auto;
  
  /* Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 120, 120, 0.3) transparent;
  scrollbar-color: #cdcbcb4d;
  
  /* Webkit */
  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  
  &::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
    margin: 2px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: rgba(120, 120, 120, 0.3);
    border-radius: 4px;
    border: 1px solid transparent;
    background-clip: padding-box;
    
    &:hover {
      background: rgba(120, 120, 120, 0.5);
    }
    
    &:active {
      background: rgba(120, 120, 120, 0.7);
    }
  }
  
  &::-webkit-scrollbar-corner {
    background: transparent;
  }
}
/* Стилизация скроллбара для Webkit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px; /* Вертикальный скроллбар */
  height: 8px; /* Горизонтальный скроллбар */
}

::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
  margin: 2px;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 120, 0.3);
  border-radius: 4px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 120, 0.5);
}

::-webkit-scrollbar-thumb:active {
  background: rgba(120, 120, 120, 0.7);
}

::-webkit-scrollbar-corner {
  background: transparent;
}


/* Тонкий вариант как в macOS */
.thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.thin::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
}

/* Контейнер со скроллом */
.scroll-container {
  overflow: auto;
  
}

/* Стилизация скроллбара для Webkit (Chrome, Safari, Edge) */
.scroll-container::-webkit-scrollbar {
  width: 8px; /* Вертикальный скроллбар */
  height: 8px; /* Горизонтальный скроллбар */
}

.scroll-container::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 4px;
  margin: 2px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: rgba(120, 120, 120, 0.3);
  border-radius: 4px;
  border: 1px solid transparent;
  background-clip: padding-box;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: rgba(120, 120, 120, 0.5);
}

.scroll-container::-webkit-scrollbar-thumb:active {
  background: rgba(120, 120, 120, 0.7);
}

.scroll-container::-webkit-scrollbar-corner {
  background: transparent;
}

/* Тонкий вариант как в macOS */
.scroll-container.thin::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.scroll-container.thin::-webkit-scrollbar-thumb {
  background: rgba(150, 150, 150, 0.3);
}


/* #### Inputs */
input {
  background-color: #1e1e1e;
  color: #a7a7a7;
  border: 1px solid #444;
  border-radius: 4px;
  font-size: 14px;
  padding: 5px;
  /* margin: 5px; */
  width: auto;
}

input::placeholder {
  color: #999;
}

/* Убираем затемнение для disabled inputs в режиме auto */
input[type="number"]:disabled {
  background-color: #222222;  /* Как у enabled */
  color: #F0F0F0;             /* Полная видимость текста */
  opacity: 1;                 /* Нет затемнения */
  cursor: default;            /* Не меняем курсор */
}

/* Видимость активного режима (auto/learn/fixed) */
button.active {
  background-color: #444444;  /* Тёмно-серый фон */
  border: 2px solid #00FF00;  /* Зелёная обводка для акцента */
  color: #FFFFFF;             /* Белый текст */
} 

/* Стили для input[type="number"]: темно-серый фон для enabled/disabled */
input[type="number"] {
  background-color: #222222;  /* Тёмно-серый фон (как у text/button) */
  color: #F0F0F0;             /* Светлый текст для читаемости */
  border: 1px solid #555555;  /* Граница как у других input */
}

/* Общий стиль для input (если нужно синхронизировать с number) */
input[type="text"] {
  background-color: #222222;
  color: #F0F0F0;
  border: 1px solid #555555;
}

/* Убираем стрелки у number input */
input {
  &::-webkit-outer-spin-button,
  &::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  -moz-appearance: textfield;
  appearance: textfield;
}

[draggable="true"] {
    cursor: move;
}

button{
    background-color: #222222; /* Dark gray for input fields and buttons */
    color: #F0F0F0;
    border: 1px solid #555555; /* Slightly lighter border for contrast */
    padding: 5px;
   /*  margin: 5px; */
}

button:hover{
    background-color: #3a3838; /* Dark gray for input fields and buttons */
    color: #fff4f4;
}

button:disabled {
    background-color: #333333;
    color: #777777;
    cursor: not-allowed;
}

/* #### sidebar */
.sidebar {
    width: 260px;
    min-width: 0;
    flex-shrink: 0;
    background: #1e1e1e;
    padding: 0;
    overflow: hidden;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.sidebar-scroll {
    min-width: 175px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    padding: 10px;
}
.sidebar-scroll > div:not(.opened-sources) {
    max-width: 300px;
}

.connect-row {
    display: flex;
    flex-direction: row;
    gap: 4px;
    align-items: stretch;
    margin: 0 0 5px 0;
}

.sidebar-heading {
    text-align: center;
    background: #2a2a2a;
    padding: 4px 8px;
    border-radius: 3px;
    margin: 6px 0 5px 0;
    font-size: 13px;
}
.connect-row input {
    flex: 1;
    min-width: 0;
}
.sidebar .connect-row button {
    flex-shrink: 0;
    width: auto;
    display: inline-block;
    margin-bottom: 0;
}

.sidebar button {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    
}
.opened-sources {
   display: flex;
    margin-top: 10px;
    margin-bottom: 10px;
    height: auto;
    width: auto;
    overflow: hidden;
}

.conn-dev {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 2px 0;
}
.conn-ip {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.conn-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.conn-status-dot.connected {
    background: #00ff00;
}
.conn-status-dot.disconnected {
    background: #ffff00;
}
.conn-status-dot.disconnect {
    background: #ff0000;
}

.mac-group {
    margin-bottom: 4px;
}

.mac-group-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 4px;
    cursor: pointer;
    font-size: 12px;
    color: #ccc;
    background: #2a2a2a;
    border-radius: 3px;
    user-select: none;
    white-space: nowrap;
    overflow: hidden;
}

.mac-group-header:hover {
    background: #3a3a3a;
}

.mac-group-header .collapse-icon {
    font-size: 10px;
    color: #888;
    width: 12px;
    text-align: center;
    flex-shrink: 0;
}

.mac-group-header .mac-address {
    font-family: monospace;
    color: #ddd;
}

.mac-group-header .mac-time {
    margin-left: auto;
    font-size: 10px;
    color: #999;
    flex-shrink: 0;
}

.mac-group-header .live-icon {
    font-size: 10px;
    flex-shrink: 0;
}

.mac-group-body {
    padding-left: 12px;
}

.mac-group-body button .live-icon {
    font-size: 10px;
}

.mac-group-body button.graph-opened {
    background: #2a302a;
    border-left: 3px solid #4a4;
    cursor: default;
}

.graph-id-table {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 2px 0;
}
.graph-id-column {
    display: flex;
    flex-direction: column;
    min-width: 68px;
}
.graph-id-header {
    font-size: 10px;
    font-weight: bold;
    color: #ccc;
    padding: 2px 4px;
    border-bottom: 1px solid #444;
    margin-bottom: 2px;
    white-space: nowrap;
}
.graph-id-column button {
    font-size: 11px;
    padding: 2px 4px;
    margin-bottom: 1px;
    text-align: left;
}
.gr-item-time {
    font-size: 10px;
    color: #999;
}

.resizer {
    height: 6px;
    padding: 1px 0;
    background-clip: content-box;
    background-color: #444;
    cursor: ns-resize;
    flex-shrink: 0;
}

.resizer-vertical {
    width: 6px;
    padding: 0 1px;
    background-clip: content-box;
    background-color: #444;
    cursor: col-resize;
    flex-shrink: 0;
    transition: background-color 0.15s;
}
.resizer-vertical:hover {
    background-color: #666;
}

.columns-area {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.column {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}
.column-graphs {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.column-resizer {
    width: 6px;
    padding: 0 1px;
    background-clip: content-box;
    background-color: #444;
    cursor: col-resize;
    flex-shrink: 0;
    transition: background-color 0.15s;
}
.column-resizer:hover {
    background-color: #666;
}
.col-buttons {
    display: inline-flex;
    margin-left: 8px;
    gap: 2px;
    vertical-align: middle;
}
.col-buttons button {
    min-width: 24px;
    padding: 2px 6px;
    font-size: 12px;
}
.col-buttons button.active {
    background-color: #444;
    border: 2px solid #00FF00;
    color: #FFF;
}

/*  #### graphs-container */

.graphs-container {
    display: flex;
    flex-direction: column;
    gap: 0.5em; /* дырка между графиками */
}

.graph-block {
    position: relative;
    /* margin-bottom: 20px; */
    background: #1e1e1e;
    /* padding: 10px; */
    /* border: 1px solid #ddd; */
    border-radius: 4px;
    min-width: 350px;

    .container{
        display: grid;
        grid-template-rows: auto 1fr;
        height: 100vh;  
            .navi{
                min-height: min-content;
                display: flex;
                flex-direction: row;
                justify-content: space-between;
                gap:0.3em;
            .handle{
                padding: 0.3em;
                cursor: move;
                font-size: 20px;
            }

            button.close{
                width: 1.6em;
                height: 1.8em;
                display: inline-flex;
                align-items: center;
                justify-content: center;
                padding: 0;
                margin: 0;
                flex-shrink: 0;
            }
            .controls {
                flex: 1;
                min-width: 0;
                flex-wrap: wrap;
            }
        }

        .controls-left {
            flex: 1 0 auto;
            display: flex;
            flex-direction: row;
            gap: 0.4em;
            align-items: center;
            overflow: hidden;
        }

        .stats-block {
            flex: 0 0 auto;
            min-width: 0;
            overflow: hidden;
            white-space: nowrap;
            font-size: 12px;
            color: #aaa;
            text-align: left;
        }

        .graph-zone{
            min-height: 0; /* Важно для корректного растяжения */
            position: relative;
            width: 100%;
            height: 100%;
            overflow: hidden;
            .graph-overlay{
                 position: absolute;
                    height: 100%;
                    width: 100%;
                    z-index: 9999;
                                
                 
                
                .channel-panel {
                  
                    display: flex;
                    pointer-events: auto;
                    flex-direction: column;
                    /* flex-wrap: wrap; */
                    gap: 0.3em;
                     
                    width: 100%; /* width: min-content; */
                    /* min-width: 100%; */
                    height: 100%;
                    /* width: 100%; */
                    white-space: nowrap;
                    .channel-item {
                        background-color: #0000009c;
                        margin: 0px 0;
                        padding: 0px;
                        border: 0px solid #ccc;
                        height: fit-content;
                        cursor: move;
                        border-radius: 4px;
                        align-items: flex-start;
                        font-size: 1em;
                        max-width: fit-content;
                    }
                }
                .channel-panel.empty {
                    width: 100%;
                    min-width: 100%;
                    background-color: transparent; /* или полупрозрачный фон для видимости */
                }
                .drop-placeholder {
                    width: 100%;
                    height: 100%;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    color: #666;
                    border: 2px dashed #ccc;
                    border-radius: 4px;
                }
            }
            .drag-target {
                width: 100%;
                height: 100%; /* Важно: наследуем высоту от graph-overlay */
                position: relative;
            }
            .drag-target > .channel-panel {
                width: 100%;
                min-width: 0;
                height: 100%; /* Наследуем высоту */
                display: block;
            }
            .drag-target.has-channels::after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 255, 0, 0.05);
                pointer-events: none;
                z-index: -1;
            }
            .empty-block-hint {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                color: #555;
                font-size: 14px;
                pointer-events: none;
                z-index: 1;
            }
        }
      
    }


    
}




.graph-header {
    position: absolute;
    display: flex;
    flex-direction: column;
    /* align-items: center; */
    margin-bottom: 10px;
    color: #bbbbbb;
    top: 0;
    background-color: #00000000;
    justify-content: center;
    width: 100%;
    height: 100%;
  
    button.active{
        background-color: green;
    }

    
}


.channel-item {
     background: #7c7c7c;
    margin: 5px 0;
    padding: 5px;  
    border: 1px solid #ccc;
    cursor: move;
    border-radius: 4px;
}

 
.graph-placeholder {
    height: 200px;
    background: #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}


.graph-item {
    margin-left: 20px;
    cursor: pointer;
    color: #00CCFF; /* Cyan for clickable graph items */
}

.graph-item.selected {
    color: #FFFF00; /* Yellow for selected graph item */
    font-weight: bold;
}

/*  #### devices */
#devices-ul {
    list-style: none;
    padding: 0;
    color: #F0F0F0;
}

.device-item {
    margin: 10px 0;
}
 
/*  #### graphs channels */
#channels label {
    color: #F0F0F0;
    margin-right: 10px;
}

#status {
    color: #00FF00; /* Green for status text */
    cursor: pointer;
}

#status.error {
    color: #ff0000; /* Red for status text */
}

#status.warn {
    color: #ffbb00; /* Red for status text */
}

#cursor-values {
    color: #F0F0F0;
}

#renderTime, #dbg1 {
    color: #F0F0F0;
}

canvas#gr1 {
    border: 1px solid #555555; /* Border for canvas to make it visible */
    background-color: #000000; /* Ensure canvas background matches body */
}

/* Ensure graph cursor text is yellow */
#gr1 + #cursor-values {
    color: #FFFF00; /* Yellow for cursor text */
}

canvas {
    width: 100%;  /* Растяжка по ширине */
    height: 200px;  /* Фикс высота, можно tunable */
    display: block;
}

#devices-container {
    border: 1px solid #555;
    padding: 10px;
    z-index: 10;
}

.graph-section {
    margin-bottom: 20px;
    border: 1px solid #555;
    padding: 10px;
}

.drop-zone {
    color: green;
    margin-left: 10px;
}

.new-graph-zone {
    background-color: green;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    cursor: pointer;
}



/* Стили для секции графика: overlay header поверх canvas */
.graph-section {
    position: relative;      /* Базовый для absolute позиционирования */
    margin-bottom: 20px;
    border: 1px solid #555;
    padding: 0;              /* Убираем padding — canvas full */
    height: 200px;           /* Фикс высота для canvas */
    overflow: hidden;        /* Скрываем выход за границы */
}

.section-header-row {
    position: absolute;
    top: 0;
    left: 0;
    /* width: 100%; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    background: transparent;  /* Полностью прозрачный фон */
    padding: 2px;            /* Уменьшено для компактности */
    box-sizing: border-box;
    pointer-events: none;    /* Пропуск событий мыши на canvas (кроме детей) */
}

.section-header-row button,
.section-header-row input {
    pointer-events: auto;    /* Восстанавливаем события для кнопок и inputs */
}

.channels-header {
    position: absolute;
    top: 45px;
    left: 0;
    width: fit-content;
    max-width: 600px;
    max-height: 200px;
    z-index: 2;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px;
    box-sizing: border-box;
    pointer-events: none;
}

/* Каждый канал (span + channel-values) на новой строке */
.channels-header span {
    display: inline;           /* Каждый span на новой строке */
    pointer-events: auto;
    margin: 0;
    white-space: nowrap;
    line-height: 1.2;         /* Компактный межстрочный интервал */
}

/* channel-values в той же строке что и название канала */
.channels-header .channel-values {
    display: inline;
    align-items: center;
    margin-left: 5px;
    color: #80C040;
    font-size: 16px;
    pointer-events: none;
    white-space: nowrap;
    border-top: 1px solid #333;
}

.channel-values span {
    display: inline-block;
    text-align: left;
    pointer-events: none;
    width:60px;
    padding-left:5px;
}

.channels-header .channel-values::after {/* вставть перевод строки после channel-values*/
    content: "\A";  /* \A - символ новой строки в CSS */
    white-space: pre; /* Сохраняет пробелы и переводы строк */
}

/* Canvas: full поверх, но под header (z-index ниже) */
.graph-section canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;              /* Под header */
    border: none;            /* Убираем border, если был */
}

/* Главный список каналов: без изменений (пробелы OK) */
#channels span {
    color: #F0F0F0;
    margin: 0.2em 0.4em;
    display: inline-block;
    white-space: nowrap;
}

#channels .channel-values {
    display: inline;
    margin-left: 5px;
    color: #00FF00;
    font-size: 11px;
    pointer-events: none;
}
.scale-input {
    font-family: monospace;
    font-size: 0.9em;
    padding: 2px 4px;
}

.traffic-table {
    display: inline-table;
    vertical-align: middle;
    margin-left: 8px;
    font-size: 11px;
    color: #888;
    border-collapse: collapse;
    font-family: monospace;
}
.traffic-table td {
    padding: 0 5px 0 0;
    white-space: nowrap;
    min-width: 12ch;
}
.t-right {
    float: right;
}

.channel-tooltip {
    position: fixed;
    z-index: 99999;
    background: #2a2a2a;
    color: #ddd;
    padding: 4px 8px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    max-width: 320px;
    white-space: pre-wrap;
    line-height: 1.3;
}

#renderStats {
    margin-top: 4px;
}
#renderStats[open] {
    padding-top: 4px;
}
#renderStats summary:hover {
    color: #fff;
    background: #2a2a2a;
}

@media (min-width: 769px) {
    #rotate-message {
        display: none;
    }
}

button{
    cursor: pointer;
}
 


/* ### unused or not in use*/

.source-column {
    min-width: 115px;
    margin-right: 2px;
    background: #2d2c2c;
    padding: 4px;
    border-radius: 4px;
    font-size: 11px;
    .channels{
         
        display: flex;
        flex-direction: column;
        gap: 0.15em;
    }
}

.source-column h4 {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}


.conn-dev button.close,
.source-column button.close {
    width: calc(1.6em - 2px);
    height: calc(1.8em - 2px);
}

.close-btn {
    cursor: pointer;
    padding: 0 5px;
}


#log {
    background-color: #111111;
    color: #00FF00;
    border: 1px solid #555555;
    height: auto;
    overflow-y: auto;
    padding: 10px;
    max-height: 300px;
}


.channels .stats {
    display: none;
}

.channel-item.sortable-drag .stats {
    display: none;
}

/* style.css (добавляем/обновляем стили для graph-block и canvas) */
.graph-block {
    border: 1px solid #555;
   /*  margin-bottom: 20px; */
}

.graph-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: left;
    z-index: 2;
    background: transparent;
    padding: 2px;
    box-sizing: border-box;
}

.graph-header * {
    pointer-events: auto;
}

canvas.graph-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border: none;
    background-color: #000022;
}



.stats {
    display: inline-block;
    margin-left: 10px;
    color: #00FF00;
    font-size: 0.9em;
    font-family: monospace;
    white-space: pre;
    pointer-events: none;
}
.stats .sym {
    color: #777;
}
.stats .unit {
    color: #4a4;
}

.stats-window {
    position: fixed;
    z-index: 99998;
    min-width: 320px;
    max-width: 500px;
    max-height: 60vh;
    background: #1a1a1a;
    border: 1px solid #555;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #2a2a2a;
    cursor: move;
    user-select: none;
    border-bottom: 1px solid #444;
    flex-shrink: 0;
}
.stats-header button.close {
    width: 1.6em;
    height: 1.6em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}
.stats-pause-btn {
    width: 1.6em;
    height: 1.6em;
    padding: 0;
    margin: 0 2px;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.stats-pause-btn:hover {
    background: #555;
    color: #fff;
}
.stats-title {
    font-size: 13px;
    font-weight: bold;
    color: #ccc;
}
.stats-body {
    overflow-y: auto;
    padding: 8px 10px;
    font-family: monospace;
    font-size: 12px;
    color: #bbb;
    flex: 1;
}
.stats-group {
    color: #0af;
    margin-top: 3px;
    margin-bottom: 1px;
}
.stats-line {
    color: #999;
    line-height: 1.5;
}
.stats-key {
    color: #aaa;
}
.stats-val {
    color: #ddd;
}
.stats-empty {
    color: #666;
    font-style: italic;
}
.stats-error {
    color: #f66;
    margin-bottom: 4px;
}
.stats-raw {
    color: #999;
    font-size: 10px;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 200px;
    overflow-y: auto;
    background: #111;
    padding: 4px 6px;
    border-radius: 3px;
    margin: 4px 0;
}
.conn-dev .stats-btn {
    width: calc(1.6em - 2px);
    height: calc(1.8em - 2px);
    padding: 0;
    margin: 0;
    font-size: 11px;
    line-height: 1;
    flex-shrink: 0;
    background: #333;
    border: 1px solid #555;
    border-radius: 3px;
    color: #ccc;
    cursor: pointer;
}
.conn-dev .stats-btn:hover {
    background: #4a4;
    color: #fff;
}
