* {
	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;
}

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

header {
	text-align: center;
	color: white;
	margin-bottom: 40px;
}

header h1 {
	font-size: 2.5rem;
	margin-bottom: 10px;
	text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header p {
	font-size: 1.1rem;
	opacity: 0.9;
}

.main-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 25px;
	margin-bottom: 30px;
}

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

.card {
	background: white;
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.card h2 {
	color: #667eea;
	margin-bottom: 20px;
	font-size: 1.5rem;
	display: flex;
	align-items: center;
	gap: 10px;
}

.card-icon {
	font-size: 1.8rem;
}

/* Upload Card */
.upload-area {
	border: 2px dashed #667eea;
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	cursor: pointer;
	background: #f8f9ff;
	transition: all 0.3s ease;
}

.upload-area:hover {
	border-color: #764ba2;
	background: #f0f2ff;
}

.upload-area.dragover {
	border-color: #764ba2;
	background: #e8ecff;
}

.upload-area input[type="file"] {
	display: none;
}

.upload-text {
	color: #667eea;
	font-weight: 500;
	margin-bottom: 10px;
}

.upload-hint {
	color: #999;
	font-size: 0.9rem;
}

.file-info {
	margin-top: 15px;
	padding: 15px;
	background: #e8f4f8;
	border-left: 4px solid #667eea;
	border-radius: 4px;
	display: none;
}

.file-info.show {
	display: block;
}

.file-info p {
	color: #333;
	margin: 5px 0;
	font-size: 0.95rem;
}

/* Button styles */
button {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border: none;
	padding: 12px 24px;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	font-size: 1rem;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	margin-top: 15px;
}

button:hover {
	transform: translateY(-2px);
	box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

button.secondary {
	background: #e8ecff;
	color: #667eea;
	border: 1px solid #667eea;
}

button.secondary:hover {
	background: #d8e0ff;
}

/* Job Creation */
.job-section {
	margin-top: 20px;
}

.status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
	text-transform: uppercase;
}

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

.status-running {
	background: #cfe2ff;
	color: #084298;
}

.status-completed {
	background: #d1e7dd;
	color: #0f5132;
}

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

.status-cancelling {
	background: #ffe5d0;
	color: #9a4b00;
}

.status-cancelled {
	background: #e2e3e5;
	color: #41464b;
}

/* Jobs List */
.jobs-container {
	max-height: 500px;
	overflow-y: auto;
	border: 1px solid #eee;
	border-radius: 8px;
}

.job-item {
	padding: 15px;
	border-bottom: 1px solid #eee;
	display: flex;
	justify-content: space-between;
	align-items: start;
}

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

.job-info {
	flex: 1;
}

.job-id {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.85rem;
	color: #666;
	margin: 5px 0;
}

.job-progress {
	margin: 10px 0;
	background: #f0f0f0;
	border-radius: 4px;
	overflow: hidden;
	height: 6px;
}

.job-progress-bar {
	background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
	height: 100%;
	transition: width 0.3s ease;
}

.job-stats {
	font-size: 0.9rem;
	color: #666;
	margin: 8px 0;
}

.job-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.job-actions button {
	padding: 8px 12px;
	font-size: 0.9rem;
	margin-top: 0;
}

/* Outputs Section */
.outputs-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 15px;
	margin-top: 20px;
}

.output-file {
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 15px;
	transition: all 0.3s ease;
}

.output-file:hover {
	border-color: #667eea;
	background: #f0f2ff;
}

.output-file-name {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.9rem;
	color: #333;
	word-break: break-all;
	margin-bottom: 10px;
}

.output-file-type {
	display: inline-block;
	padding: 3px 8px;
	background: #667eea;
	color: white;
	border-radius: 3px;
	font-size: 0.75rem;
	font-weight: 500;
	margin-bottom: 10px;
}

.output-file-size {
	font-size: 0.85rem;
	color: #666;
	margin-bottom: 5px;
}

.output-file-date {
	font-size: 0.85rem;
	color: #999;
	margin-bottom: 10px;
}

.output-file button {
	width: 100%;
}

/* Health Check */
.health-indicator {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #d1e7dd;
	color: #0f5132;
	border-radius: 20px;
	font-size: 0.9rem;
	font-weight: 500;
}

.health-indicator.offline {
	background: #f8d7da;
	color: #842029;
}

.health-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #0f5132;
	animation: pulse 2s infinite;
}

.health-dot.offline {
	background: #842029;
	animation: none;
}

@keyframes pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* Loading spinner */
.spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
	border: 2px solid #f3f3f3;
	border-top: 2px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-right: 8px;
}

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

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

.empty-state-icon {
	font-size: 3rem;
	margin-bottom: 10px;
}

.error {
	background: #f8d7da;
	color: #842029;
	padding: 15px;
	border-radius: 6px;
	margin-top: 15px;
	display: none;
	border-left: 4px solid #842029;
}

.error.show {
	display: block;
}

.success {
	background: #d1e7dd;
	color: #0f5132;
	padding: 15px;
	border-radius: 6px;
	margin-top: 15px;
	display: none;
	border-left: 4px solid #0f5132;
}

.success.show {
	display: block;
}

.tabs {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
	border-bottom: 2px solid #eee;
}

.tab-button {
	background: none;
	color: #667eea;
	border: none;
	padding: 12px 20px;
	cursor: pointer;
	font-weight: 500;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
	margin-top: 0;
	margin-bottom: -2px;
}

.tab-button.active {
	border-bottom-color: #667eea;
	color: #333;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
}

.api-endpoints {
	background: #f8f9fa;
	border-left: 4px solid #667eea;
	padding: 15px;
	border-radius: 4px;
	margin-top: 20px;
}

.endpoint {
	margin: 12px 0;
	padding: 10px;
	background: white;
	border-radius: 4px;
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.9rem;
}

.endpoint-method {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-weight: 600;
	margin-right: 8px;
	font-size: 0.85rem;
}

.method-get {
	background: #cfe2ff;
	color: #084298;
}

.method-post {
	background: #d1e7dd;
	color: #0f5132;
}

footer {
	text-align: center;
	color: white;
	margin-top: 50px;
	padding: 20px;
	opacity: 0.8;
}
