/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

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

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 300;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Panels */
.panel {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e1e8ed;
}

.panel h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 500;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* Job Cards */
.jobs-list {
    display: grid;
    gap: 20px;
}

.job-card {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    background: #fafbfc;
    transition: all 0.3s ease;
}

.job-card:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.1);
}

.job-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.job-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.parameters {
    background: #ecf0f1;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.parameters ul {
    margin-left: 20px;
    margin-top: 5px;
}

/* Forms */
.job-form {
    margin-top: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-group input[type="number"] {
    min-width: 120px;
}

.job-form input[type="file"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
    margin-bottom: 15px;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* Job Results */
.job-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.job-result.show {
    display: block;
}

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

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

.job-result.loading {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Notification with close button */
.job-result {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.notification-message {
    flex: 1;
    margin-right: 10px;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    opacity: 0.7;
}

.notification-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    opacity: 1;
}

.job-result.success .notification-close {
    color: #155724;
}

.job-result.error .notification-close {
    color: #721c24;
}

.job-result.loading .notification-close {
    color: #856404;
}

/* Logs Container */
.logs-container,
.files-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: #fafbfc;
}

.log-entry,
.file-entry {
    padding: 12px;
    border-bottom: 1px solid #e1e8ed;
    font-size: 0.9rem;
}

.log-entry:last-child,
.file-entry:last-child {
    border-bottom: none;
}

.log-entry.completed {
    background-color: #d4edda;
}

.log-entry.failed {
    background-color: #f8d7da;
}

.log-entry.running {
    background-color: #fff3cd;
}

.log-meta {
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
}

.log-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 10px;
}

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

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

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

.status-pending {
    background-color: #e2e3e5;
    color: #383d41;
}

/* File entries */
.file-entry .file-name {
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    color: #7f8c8d;
    font-size: 0.8rem;
}

/* Loading states */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 2rem;
    }

    .panel {
        padding: 15px;
    }

    .job-form {
        flex-direction: column;
        align-items: stretch;
    }

    .job-form input[type="file"] {
        margin-bottom: 10px;
    }
}