* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 900px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.config-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.config-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 10px;
}

.config-hint {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.services-grid {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.service-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    background: #fff;
}

.service-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
}

.service-info {
    flex: 1;
}

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

.service-status {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-running {
    background: #d4edda;
    color: #155724;
}

.status-stopped {
    background: #f8d7da;
    color: #721c24;
}

.status-scaling {
    background: #fff3cd;
    color: #856404;
}

.service-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-start {
    background: #28a745;
    color: white;
}

.btn-start:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-start:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-stop {
    background: #dc3545;
    color: white;
}

.btn-stop:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.btn-stop:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-refresh {
    background: #667eea;
    color: white;
    padding: 10px 12px;
}

.btn-refresh:hover {
    background: #5568d3;
}

.refresh-btn-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

.message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.loading {
    background: #e7f3ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.last-updated {
    font-size: 12px;
    color: #999;
    text-align: right;
    margin-top: 20px;
}

.cluster-header {
    color: #333;
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    margin-top: 20px;
}

.cluster-section {
    margin-bottom: 30px;
}

.filter-section {
    background: #f0f4ff;
    border: 1px solid #d0deff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.filter-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    font-size: 13px;
}

.filter-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-option input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.filter-option label {
    cursor: pointer;
    font-size: 13px;
    color: #555;
}

.hidden-service {
    opacity: 0.5;
    pointer-events: none;
}

.user-info-section {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.user-info-label {
    font-weight: 600;
    color: #004085;
    margin-bottom: 8px;
    font-size: 13px;
}

.user-info-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-email-input {
    padding: 8px 12px;
    border: 1px solid #80bdff;
    border-radius: 6px;
    font-size: 13px;
    flex: 1;
    max-width: 300px;
}

.btn-set-user {
    background: #0056b3;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-set-user:hover {
    background: #004085;
}

.user-badge {
    background: #007bff;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .service-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .service-actions {
        width: 100%;
        margin-left: 0;
    }

    .service-actions button {
        flex: 1;
    }
}

.meta {
    color: #999;
    font-size: 12px;
}

[hidden] {
    display: none !important;
}
