body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    background-image: radial-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    color: #f0f0f0;
    position: relative;
    overflow: hidden;
}

body::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-image: radial-gradient(rgba(76,175,80,0.05) 1px, transparent 1px);
    background-size: 25px 25px;
    animation: move-bg 60s linear infinite;
    z-index: 0;
}

@keyframes move-bg {
    0% { transform: translate(0,0); }
    100% { transform: translate(50px,50px); }
}

/* ---- Боковая панель ---- */
.sidebar {
    height: 100vh;
    width: 220px;
    position: fixed;
    background-color: #181818;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
}

.sidebar h2 {
    margin: 20px;
    font-size: 22px;
    color: #4CAF50;
    text-align: center;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.sidebar button {
    padding: 18px 24px;
    border: none;
    background: none;
    color: #f0f0f0;
    font-size: 18px;
    cursor: pointer;
    text-align: left;
    transition: 0.3s;
}

.sidebar button.active, .sidebar button:hover {
    background-color: #222;
    color: #4CAF50;
}

/* ---- Основная панель ---- */
.main {
    margin-left: 220px;
    padding: 40px;
    position: relative;
}

/* ---- Профиль ---- */
.profile-box {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(30,30,30,0.85);
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 0 15px rgba(76,175,80,0.3);
    backdrop-filter: blur(5px);
    z-index: 10;
}

.profile-box .username {
    font-weight: 600;
    color: #fff;
}

.profile-box .role-display {
    font-size: 14px;
    color: #4CAF50;
}

.logout-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: #f44336;
    color: #fff;
    cursor: pointer;
    transition: 0.2s;
}

.logout-btn:hover {
    background-color: #e53935;
}

/* ---- Кнопки и поля ---- */
button.start, button.stop {
    padding: 18px 60px;
    font-size: 20px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}
button.start { background-color: #4CAF50; color: #fff; }
button.stop { background-color: #f44336; color: #fff; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

input {
    width: 80%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    background: rgba(255,255,255,0.05);
    color: #fff;
    margin-bottom: 15px;
}

/* ---- Статус ---- */
.status {
    font-size: 28px;
    margin-bottom: 25px;
    font-weight: 600;
}
.running { color: #4CAF50; }
.stopped { color: #f44336; }

/* ---- Логи ---- */
pre#log-box {
    background:#111;
    color:#0f0;
    padding:20px;
    height:400px;
    overflow-y:auto;
    border-radius:10px;
    font-size:14px;
    box-shadow: inset 0 0 10px rgba(0,255,0,0.2);
}

.log-tabs {
    display: flex;
    overflow-x: auto;  /* горизонтальный скролл */
    white-space: nowrap;
    gap: 5px;
    padding: 5px;
    border-bottom: 1px solid #ccc;
}

.log-tabs button {
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: #f0f0f0;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: 0.2s;
}

.log-tabs button.active {
    background: #4CAF50;
    color: #fff;
    box-shadow: 0 4px 12px rgba(76,175,80,0.5);
}

.log-tabs button:hover:not(.active) {
    background: rgba(76, 175, 80, 0.15);
    box-shadow: 0 2px 6px rgba(76,175,80,0.3);
}

.system-load {
    margin-top: 30px;
    padding: 20px;
    background: rgba(30,30,30,0.8);
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(76,175,80,0.3);
    font-size: 18px;
}

.system-load span {
    font-weight: 600;
    color: #4CAF50;
}
.sidebar-load {
    margin-top: auto; /* прижимает к низу панели */
    padding: 15px 20px;
    font-size: 14px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #ccc;
    text-align: left;
}

.sidebar-load span {
    font-weight: 600;
    color: #4CAF50;
}

.sidebar-load h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #fff;
}