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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.refresh-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: #667eea;
    color: white;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.refresh-btn:hover {
    background: #764ba2;
}

.refresh-btn:active {
    transform: scale(0.95);
}

h1 {
    font-size: 24px;
    color: #667eea;
}

h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #555;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 14px;
}

.status-badge.healthy { background: #4caf50; color: white; }
.status-badge.warning { background: #ff9800; color: white; }
.status-badge.critical { background: #f44336; color: white; }
.status-badge.error { background: #9e9e9e; color: white; }

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.metric label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

.metric span {
    font-size: 14px;
    color: #777;
}

.progress-bar {
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease, background-color 0.3s ease;
}

.progress-fill.healthy { background: #4caf50; }
.progress-fill.warning { background: #ff9800; }
.progress-fill.critical { background: #f44336; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.service-card {
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f9f9f9;
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.service-card.running {
    border-left-color: #4caf50;
}

.service-card.stopped {
    border-left-color: #f44336;
    background: #ffebee;
}

.service-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
}

.service-status {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.service-details {
    font-size: 11px;
    color: #999;
    margin-top: 5px;
}

.service-image {
    font-size: 10px;
    color: #bbb;
    margin-top: 3px;
    font-family: monospace;
}

.error-message, .no-services {
    text-align: center;
    padding: 30px;
    color: #999;
    font-style: italic;
}

.error-message {
    color: #f44336;
    font-weight: bold;
}

.n8n-placeholder {
    opacity: 0.6;
    border: 2px dashed #ccc;
}

.placeholder-text {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
}

footer {
    text-align: center;
    color: white;
    font-size: 14px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}
