:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-color: #4b5563;
    --dark-color: #e2e8f0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-color: #e2e8f0;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    --transition: all 0.3s ease;
    --border-color: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

h1 {
    color: var(--dark-color);
    font-size: 24px;
    font-weight: 500;
}

h2 {
    color: var(--dark-color);
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 500;
}

.last-update {
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.8;
}

.dashboard {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.system-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 5px;
}

.progress-bar {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-fill.cpu {
    background-color: var(--primary-color);
}

.progress-fill.memory {
    background-color: var(--secondary-color);
}

.progress-fill.temp {
    background-color: var(--warning-color);
}

.progress-fill.load {
    background-color: var(--primary-color);
}

.chart-container {
    height: 200px;
    margin-top: 15px;
}

.disk-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.disk-item {
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.disk-item:last-child {
    border-bottom: none;
}

.disk-details {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 5px;
}

.disk-mount {
    font-weight: 500;
}

.disk-usage {
    white-space: nowrap;
}

.container-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: var(--light-color);
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    color: var(--text-color);
}

.filter-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
}

#container-search {
    flex-grow: 1;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
}

.container-table-wrapper {
    overflow-x: auto;
}

.container-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.container-table th {
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.05);
    font-weight: 500;
    font-size: 14px;
}

.container-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.container-table tr:last-child td {
    border-bottom: none;
}

.container-table .status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
    min-width: 80px;
}

.container-table .status.running {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.container-table .status.stopped {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.container-table .status.unhealthy {
    background-color: rgba(243, 156, 18, 0.2);
    color: #d35400;
}

.container-table .timestamp {
    white-space: nowrap;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.loading {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.reload-btn {
    display: block;
    margin: 10px auto;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.reload-btn:hover {
    background-color: #2980b9;
}

footer {
    text-align: center;
    margin-top: 20px;
    padding: 20px 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    border-top: 1px solid var(--border-color);
}

/* Styl pro upozornění */
.alerts-container {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    max-width: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert {
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    position: relative;
    max-width: 100%;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.2);
    border-left: 4px solid #ef4444;
    color: #fca5a5;
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.2);
    border-left: 4px solid #f59e0b;
    color: #fcd34d;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.2);
    border-left: 4px solid #3b82f6;
    color: #93c5fd;
}

.alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.alert-content {
    flex-grow: 1;
}

.alert-content h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
}

.alert-content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    position: absolute;
    top: 10px;
    right: 10px;
}

.alert-close:hover {
    opacity: 1;
}

@media (max-width: 768px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .system-stats {
        grid-template-columns: 1fr;
    }
    
    .container-table th, 
    .container-table td {
        padding: 8px 10px;
    }
    
    h1 {
        font-size: 20px;
    }
    
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .last-update {
        margin-top: 5px;
    }
}