* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    background: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h1 {
    color: #667eea;
    font-size: 2em;
    margin-bottom: 10px;
}

.status-bar {
    display: flex;
    gap: 20px;
    align-items: center;
    font-size: 0.9em;
    color: #666;
}

.status-ok {
    color: #10b981;
    font-weight: bold;
}

.status-error {
    color: #ef4444;
    font-weight: bold;
}

/* Metrics Cards */
.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.metric-card h3 {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.metric-card .value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

/* Sections */
.section {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.section h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    font-size: 1em;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: #667eea;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.3s;
}

button:hover {
    background: #5568d3;
}

button:active {
    transform: scale(0.98);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #f9fafb;
}

th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
}

tbody tr:hover {
    background: #f9fafb;
}

/* Status Badges */
.status-pending { color: #f59e0b; font-weight: bold; }
.status-processing { color: #3b82f6; font-weight: bold; }
.status-completed { color: #10b981; font-weight: bold; }
.status-failed { color: #ef4444; font-weight: bold; }
.status-idle { color: #10b981; font-weight: bold; }
.status-busy { color: #f59e0b; font-weight: bold; }
.status-restarting { color: #8b5cf6; font-weight: bold; }
.status-stopped { color: #ef4444; font-weight: bold; }

/* Progress Bar */
.progress {
    background: #e5e7eb;
    border-radius: 10px;
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75em;
    font-weight: bold;
    transition: width 0.3s;
}

/* Filters */
.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.filter-btn:hover {
    background: #e5e7eb;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Logs */
#log-console {
    background: #1f2937;
    color: #f3f4f6;
    padding: 15px;
    border-radius: 5px;
    height: 400px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    line-height: 1.5;
}

.log-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-left: 3px solid transparent;
}

.log-info { border-left-color: #3b82f6; }
.log-warning { border-left-color: #f59e0b; }
.log-error { border-left-color: #ef4444; }
.log-debug { border-left-color: #6b7280; }

.log-time {
    color: #9ca3af;
    margin-right: 10px;
}

.log-level {
    font-weight: bold;
    margin-right: 10px;
}

.log-message {
    color: #f3f4f6;
}

.log-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    animation: slideIn 0.3s;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.fade-out {
    animation: fadeOut 0.3s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.notification-success {
    border-left: 4px solid #10b981;
}

.notification-error {
    border-left: 4px solid #ef4444;
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-info {
    border-left: 4px solid #3b82f6;
}

/* Links */
a {
    color: #667eea;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Error State */
.error {
    color: #ef4444;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .metrics {
        grid-template-columns: 1fr;
    }
    
    table {
        font-size: 0.85em;
    }
    
    .status-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

