* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Боковая панель */
.sidebar {
    width: 280px;
    background-color: #1e293b;
    border-right: 1px solid #334155;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #334155;
}

.sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.live-button {
    background-color: #334155;
    color: #94a3b8;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.live-button.active {
    background-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.file-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.empty-list {
    text-align: center;
    color: #64748b;
    margin-top: 20px;
    font-size: 0.9rem;
}

.file-item {
    padding: 10px 12px;
    margin-bottom: 6px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-item:hover {
    border-color: #64748b;
}

.file-item.selected {
    border-color: #3b82f6;
    background-color: #1e3a8a33;
}

.file-name {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-time {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 4px;
}

/* Основная часть */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0f172a;
}

.top-bar {
    height: 60px;
    padding: 0 20px;
    background-color: #1e293b;
    border-bottom: 1px solid #334155;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ef4444;
}

.dot.connected {
    background-color: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.metric-card {
    font-size: 0.9rem;
    background: #0f172a;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #334155;
}

.metric-card strong {
    color: #38bdf8;
    margin-left: 6px;
}

.active-file-label {
    font-size: 0.85rem;
    color: #94a3b8;
}

.active-file-label span {
    color: #f8fafc;
    font-weight: 600;
}

.chart-container {
    flex: 1;
    padding: 20px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    margin-bottom: 6px;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.file-info {
    flex: 1;
    overflow: hidden;
}

.delete-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background-color: #ef444433;
    color: #ef4444;
}