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

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

.dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.header h1 {
    font-size: 1.5rem;
    color: #2c3e50;
}

/* Tab Navigation */
.tabs {
    display: flex;
    gap: 5px;
    padding: 0 20px;
    background: #fff;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0;
    border-bottom: 1px solid #ecf0f1;
}

.tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.tab:hover {
    color: #3498db;
    background: #f8f9fa;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
    background: #f8f9fa;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.stat-success { color: #27ae60; }
.stat-warning { color: #f39c12; }
.stat-error { color: #e74c3c; }

/* Stats Card */
.stats-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.stats-card h2 {
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
}

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

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item .stat-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
}

/* Stats Breakdown */
.stats-breakdown {
    padding: 0 20px 20px;
}

.stats-breakdown h3 {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 600;
}

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

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.breakdown-label {
    font-size: 0.9rem;
    color: #666;
}

.breakdown-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Control Panel */
.control-panel {
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label {
    font-size: 0.9rem;
    color: #666;
}

.control-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, opacity 0.2s;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
}

.btn-secondary {
    background: #95a5a6;
    color: #fff;
}

.btn-secondary:hover:not(:disabled) {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #c0392b;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Progress Section */
.progress-section {
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-text {
    font-weight: bold;
    color: #2c3e50;
}

.progress-bar-container {
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 12px;
    transition: width 0.3s ease;
}

.batch-info {
    font-size: 0.9rem;
    color: #666;
}

/* Sections */
.entries-section,
.runs-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.entries-section h2,
.runs-section h2 {
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #2c3e50;
    border-bottom: 1px solid #ecf0f1;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f8f9fa;
}

.loading {
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

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

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

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

.status-running {
    background: #cce5ff;
    color: #004085;
}

/* Action Buttons */
.actions {
    display: flex;
    gap: 5px;
}

.actions .btn {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }

    .controls {
        flex-direction: column;
        align-items: flex-start;
    }

    th, td {
        padding: 10px;
        font-size: 0.85rem;
    }
}
