* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #222222;
    color: #dddddd;
}

/* Layout grid: header full width, left nav, content fills remaining space */
#mainpage-container {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 70px 1fr;
    grid-template-areas:
        "header header"
        "nav content";
    gap: 0;
}

/* Header spanning full width */
#header-strip {
    grid-area: header;
    background: #111;
    padding: 16px 20px;
    display: flex;
    align-items: center;
}

#header-strip h1 {
    margin: 0;
    font-size: 1.25rem;
}

/* Left vertical menu */
#vertical-menu {
    grid-area: nav;
    background: #181818;
    padding: 20px 12px;
}

#vertical-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#vertical-menu li {
    padding: 10px 8px;
    margin-bottom: 6px;
    border-radius: 6px;
    color: #ddd;
    cursor: pointer;
}

#vertical-menu li:hover {
    background: rgba(255,255,255,0.03);
}

/* Content panel fills remaining area */
#content-panel {
    grid-area: content;
    padding: 24px;
    background: #262626;
    overflow: auto;
}

#message-strip {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #333;
    border-left: 4px solid #ff9800;
}
.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.status-panel {
    margin-bottom: 16px;
    padding: 16px;
    background: #2a2a2a;
}
@keyframes pulse-critical {
    0% {
        border-left-color: #ff0000;
       
    }
    50% {
        border-left-color: #550000;
        
    }
    100% {
        border-left-color: #ff0000;
        
    }
}

.status-panel-critical {
    border-left: 4px solid #ff0000;
    animation: pulse-critical 1.8s ease-in-out infinite;
}


.status-panel-ok {
    border-left: 4px solid #4caf50;
}

.status-panel-warning {
    border-left: 4px solid #ff9800;
}

#authenticate-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #333;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 1000;
}

.thumbnail {
    width: 25px;
    height: 25px;
    background-image: linear-gradient(to top, #d1a140, #c9c9fa);
    display: inline-block;
    margin-right: 4px;
}

/* Responsive: stack on small screens */
@media (max-width: 700px) {
    #mainpage-container {
        grid-template-columns: 1fr;
        grid-template-rows: 70px auto 1fr;
        grid-template-areas:
            "header"
            "nav"
            "content";
    }

    /* Make the nav horizontal and scrollable on small screens */
    #vertical-menu {
        padding: 12px;
    }
    #vertical-menu ul {
        display: flex;
        gap: 8px;
        overflow-x: auto;
    }
    #vertical-menu li {
        white-space: nowrap;
        margin-bottom: 0;
    }
}
