/* Existing styles */
body {
    font-family: sans-serif;
    margin: 2em;
    background-color: #f9f9f9;
    color: #333;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

th, td {
    border: 1px solid #ccc;
    padding: 0.75em;
    text-align: left;
}

th {
    background-color: #e9e9e9;
}

h1, h2, h3 {
    color: #444;
}

hr {
    border: 0;
    height: 1px;
    background: #ddd;
    margin: 2em 0;
}

/* New styles */
#period-selector, #metric-selector, #user-metric-selector, #ud-provider, #ud-activity-type, input[type="date"], input[type="email"], button {
    padding: 0.5em;
    margin-right: 1em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border: none;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#drill-down-section {
    padding: 1.5em;
    border: 1px solid #ddd;
    margin-top: 2em;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#user-activity-filters label {
    margin-right: 0.5em;
}
#user-activity-filters input, #user-activity-filters select {
    margin-right: 1em;
}


.user-drilldown-link {
    color: #007bff;
    text-decoration: underline;
    cursor: pointer;
}
.user-drilldown-link:hover {
    color: #0056b3;
}

#backfill-form label {
    display: inline-block;
    min-width: 250px;
    margin-bottom: 0.5em;
}
#backfill-form input {
    margin-bottom: 0.5em;
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#backfill-status-area {
    margin-top: 1em;
    padding: 1em;
    background-color: #eef;
    border: 1px solid #cce;
    border-radius: 4px;
}

#user-activity-pagination button {
    margin: 0 5px;
}
#user-activity-pagination span {
    margin: 0 10px;
}

/* Progress tracking styles */
#backfill-progress-container {
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

#backfill-progress-bar {
    height: 20px;
    border-radius: 5px;
    transition: width 0.3s ease-in-out;
    background: linear-gradient(90deg, #4CAF50 0%, #45a049 100%);
}

.status-pending {
    color: #FF9800 !important;
    font-weight: bold;
}

.status-running {
    color: #2196F3 !important;
    font-weight: bold;
}

.status-completed {
    color: #4CAF50 !important;
    font-weight: bold;
}

.status-failed {
    color: #f44336 !important;
    font-weight: bold;
}

#backfill-timing-info {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border-left: 4px solid #007bff;
}

#backfill-timing-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

/* Active jobs list styles */
#active-backfill-jobs {
    margin-top: 2em;
    padding: 1em;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.job-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    cursor: pointer;
}

.job-item:hover {
    background-color: #f0f8ff;
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,123,255,0.15);
    transform: translateY(-1px);
}

.job-item .progress-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.job-item .progress-fill {
    height: 10px;
    border-radius: 3px;
    transition: width 0.3s ease-in-out;
}

#refresh-jobs-btn {
    background-color: #28a745;
    margin-top: 10px;
}

#refresh-jobs-btn:hover {
    background-color: #218838;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .job-item > div:first-child {
        flex-direction: column !important;
    }
    
    .job-item > div:first-child > div:last-child {
        text-align: left !important;
        margin-top: 10px;
    }
    
    #backfill-form label {
        min-width: auto;
        display: block;
        margin-bottom: 5px;
    }
    
    #backfill-form input {
        width: 100%;
        box-sizing: border-box;
    }
}
