/* Components: jobs, tables, analytics, pagination */

/* Job List */
.job-list {
    /* Allow full expansion without scroll */
}

.job {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    cursor: pointer;
}

.job:hover { background: #f8f9fa; }

.job-header {
    padding: 8px;
}

.job-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-title {
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
}

.job-link {
    font-size: 10px;
    color: #3498db;
    text-decoration: none;
}

.job-link:hover {
    text-decoration: underline;
}

.job-meta {
    font-size: 12px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    margin-top: 2px;
}

.job-description {
    padding: 0 8px 8px 8px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.job-description-content {
    font-size: 12px;
    line-height: 1.6;
    color: #555;
    padding: 10px 0;
    max-height: 200px;
    overflow-y: auto;
}

.job-details {
    font-size: 11px;
    color: #6c757d;
    display: flex;
    justify-content: space-between;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

.cpc {
    background: #27ae60;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

/* Tables */
table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
}

th, td {
    padding: 6px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
    position: sticky;
    top: 0;
}

/* Result Count */
.result-count {
    font-size: 12px;
    color: #2c3e50;
    padding: 8px 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-count > span:first-child {
    font-weight: 600;
}

.result-count .pagination {
    flex: 1;
    justify-content: center;
}

.search-time {
    color: #6c757d;
    font-weight: 500;
    font-size: 11px;
    margin-left: auto;
}

/* Analytics */
.analytics-tab {
    font-size: 12px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    color:#888;
    cursor: pointer;
    transition: all 0.2s;
}

.analytics-tab:hover {
    background: #f8f9fa;
}

.analytics-tab.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.analytics-content {
    max-height: 500px;
    overflow-y: auto;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    font-size: 11px;
    padding: 4px 8px;
    border: 1px solid #cbd5e0;
    background: #f7fafc;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 3px;
    font-weight: 600;
    min-width: 32px;
}

.pagination-btn:hover:not(:disabled) {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-btn:disabled {
    background: #f7fafc;
    cursor: not-allowed;
    opacity: 0.5;
    color: #a0aec0;
}

.pagination-current {
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    padding: 0 6px;
}

.pagination-goto {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.pagination-input {
    width: 45px;
    height: 24px;
    padding: 2px 4px;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    font-size: 11px;
    text-align: center;
}

.pagination-input:focus {
    outline: none;
    border-color: #3498db;
}

/* Hide number input arrows */
.pagination-input::-webkit-inner-spin-button,
.pagination-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pagination-input[type=number] {
    -moz-appearance: textfield;
}

/* Generation Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #495057;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.generations-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.generations-table th,
.generations-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.generations-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 12px;
    text-transform: uppercase;
}

.generations-table tr.current-gen {
    background: #e3f2fd;
}

.generations-table .badge {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}