body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Header and Navigation Styles */
.main-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    width: 100%;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 15px 0;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin: 0;
    padding: 0;
}

.nav-links a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    padding: 15px 20px;
    transition: background-color 0.3s, color 0.3s;
}

.nav-links a:hover {
    background-color: #34495e;
    color: #3498db;
}

.nav-links a.active {
    background-color: #3498db;
    color: #fff;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

h1 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
}

h2 {
    color: #3498db;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 30px;
}

.btn {
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Button for fetching jobs */
.btn-fetch {
    background-color: #3498db;
}

.btn-fetch:hover {
    background-color: #2980b9;
}

/* Button for comparing jobs */
.btn-compare {
    background-color: #9b59b6;
}

.btn-compare:hover {
    background-color: #8e44ad;
}

/* Button for fetching all companies */
.btn-fetch-all {
    background-color: #3498db;
}

.btn-fetch-all:hover {
    background-color: #2980b9;
}

/* Button for comparing all jobs */
.btn-compare-all {
    background-color: #9b59b6;
}

.btn-compare-all:hover {
    background-color: #8e44ad;
}

/* Primary button for combined actions */
.btn-primary {
    background-color: #2ecc71;
    font-weight: 600;
    min-width: 160px;
}

.btn-primary:hover {
    background-color: #27ae60;
}

.btn-secondary {
    background-color: #607d8b;
}

.btn-secondary:hover {
    background-color: #4f6874;
}

.admin-panel,
.shortlist-panel {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.admin-secret-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.admin-secret-row label,
.shortlist-controls label {
    font-weight: 600;
    color: #2c3e50;
}

.admin-secret-input,
.shortlist-number {
    min-height: 34px;
    padding: 8px 10px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 14px;
}

.shortlist-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.shortlist-header h2 {
    margin: 0;
    padding: 0;
    border: 0;
    color: #2c3e50;
}

.shortlist-meta {
    margin: 4px 0 0;
    color: #607d8b;
    font-size: 14px;
}

.shortlist-actions,
.shortlist-controls,
.shortlist-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shortlist-controls {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #e6eaed;
}

.shortlist-number {
    width: 72px;
}

.shortlist-summary {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #eef7ff;
    color: #24577a;
    font-size: 14px;
}

.shortlist-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-state {
    padding: 18px;
    color: #607d8b;
    text-align: center;
    border: 1px dashed #cfd8dc;
    border-radius: 6px;
    background: #fff;
}

.shortlist-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 14px;
    border: 1px solid #dde5ea;
    border-left: 4px solid #3498db;
    border-radius: 8px;
    background: #fff;
}

.shortlist-item.shortlist-muted {
    opacity: 0.62;
}

.shortlist-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.shortlist-title-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: flex-start;
}

.shortlist-title-row h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 17px;
    line-height: 1.35;
}

.shortlist-score {
    min-width: 36px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #1b5e20;
    text-align: center;
    font-weight: 700;
    font-size: 13px;
}

.shortlist-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.shortlist-tags span {
    padding: 3px 8px;
    background: #f1f5f8;
    border-radius: 999px;
    color: #455a64;
    font-size: 12px;
}

.shortlist-body p {
    margin: 9px 0;
    color: #455a64;
}

.shortlist-warning {
    color: #9a6700 !important;
}

.shortlist-detail {
    margin: 12px 0 0;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    padding: 12px;
    background: #f5f7f9;
    border: 1px solid #dce3e8;
    border-radius: 6px;
    color: #263238;
}

.company-jobs {
    margin-bottom: 30px;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    background-color: #f9f9f9;
}

.company-jobs h4 {
    margin-top: 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.debug-container {
    margin-top: 30px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.debug-container h3 {
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-top: 0;
}

.debug-section {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.debug-section h4 {
    color: #3498db;
    margin-top: 0;
    margin-bottom: 10px;
}

.debug-section.error {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.hidden {
    display: none;
}

.loading-indicator {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
    width: auto;
}

.loading-indicator.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-right: 20px;
    flex-shrink: 0;
}

.loading-status {
    flex: 1;
}

#loadingMessage {
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.progress-container {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    margin-bottom: 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-details {
    font-size: 14px;
    color: #555;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.progress-details .company-status {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.progress-details .company-status:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.progress-details .status-pending {
    color: #777;
}

.progress-details .status-processing {
    color: #f39c12;
    font-weight: 500;
}

.progress-details .status-completed {
    color: #27ae60;
}

.progress-details .status-error {
    color: #e74c3c;
}

.jobs-container {
    margin-top: 30px;
}

.jobs-list {
    margin: 15px 0;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    border-left: 4px solid #3498db;
}

.jobs-section {
    margin-bottom: 30px;
}

.jobs-section h4 {
    color: #fff;
    background-color: #3498db;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.company-selector {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.company-select {
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 16px;
    width: 100%;
    margin-top: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.action-buttons {
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.button-group {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.button-group h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.job-item {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.job-title {
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
}

.job-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.job-link, .job-permalink {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    padding: 3px 8px;
    border: 1px solid #3498db;
    border-radius: 3px;
    transition: all 0.2s;
}

.job-link:hover, .job-permalink:hover {
    background-color: #3498db;
    color: white;
}

.job-permalink {
    border-color: #27ae60;
    color: #27ae60;
}

.job-permalink:hover {
    background-color: #27ae60;
    color: white;
}

.status-indicator {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: bold;
}

.status-indicator.new {
    background-color: #3498db;
    color: white;
}

.status-indicator.published {
    background-color: #2ecc71;
    color: white;
}

.status-indicator.obsolete {
    background-color: #e74c3c;
    color: white;
}

.status-indicator.new {
    background-color: #3498db;
    color: white;
}

.status-indicator.draft {
    background-color: #f39c12;
    color: white;
}

.status-indicator.scheduled {
    background-color: #9b59b6;
    color: white;
}

.new-job {
    background-color: #fff8f8;
    border-left: 4px solid #e74c3c;
}

.draft-job {
    border-left: 4px solid #f39c12;
    background-color: rgba(243, 156, 18, 0.1);
}

.scheduled-job {
    border-left: 4px solid #9b59b6;
    background-color: rgba(155, 89, 182, 0.1);
}

.obsolete-job {
    border-left: 4px solid #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

.section-header {
    font-weight: bold;
    margin-bottom: 10px;
}

.new-jobs-header {
    color: #3498db;
}

.draft-jobs-header {
    color: #f39c12;
}

.scheduled-jobs-header {
    color: #9b59b6;
}

.existing-jobs-header {
    color: #27ae60;
}

.obsolete-jobs-header {
    color: #e74c3c;
}

.wp-id {
    font-size: 12px;
    color: #7f8c8d;
    margin-right: 10px;
}

.existing-job {
    background-color: #f8fff8;
    border-left: 4px solid #27ae60;
}

/* Debug styles */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    width: 300px;
}

.notification {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.notification-success {
    background-color: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.notification-error {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.notification-info {
    background-color: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.notification-close {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
    font-size: 16px;
    color: rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

.accordion-header {
    cursor: pointer;
    padding: 10px;
    background-color: #f1f1f1;
    border-radius: 4px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background-color: #e9e9e9;
}

.accordion-icon {
    transition: transform 0.3s;
}

.accordion-icon.collapsed {
    transform: rotate(-90deg);
}

.accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content.collapsed {
    max-height: 0;
}

.debug-container {
    margin-top: 30px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.debug-container .accordion-section {
    border: none;
}

.debug-container .accordion-header {
    padding: 15px 20px;
    background-color: #f0f0f0;
    border-radius: 8px 8px 0 0;
}

.debug-container .accordion-content {
    padding: 0 20px 20px 20px;
    max-height: 500px;
    overflow-y: auto;
}

.debug-container pre {
    margin: 0;
    white-space: pre-wrap;
    font-size: 13px;
}

/* Company Selection Panel */
.career-link {
    font-size: 14px;
    color: #3498db;
    margin-left: 10px;
    text-decoration: none;
    font-weight: normal;
}

.career-link:hover {
    text-decoration: underline;
    color: #2980b9;
}

.company-selection-panel {
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.select-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

#selectedCount {
    font-size: 0.9em;
    color: #666;
}

.company-checkboxes {
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    transition: max-height 0.3s ease-in-out;
}

.company-checkboxes.collapsed {
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

.company-checkbox {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
}

.company-checkbox:hover {
    background-color: #f0f0f0;
}

.company-checkbox label {
    margin-left: 6px;
    cursor: pointer;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.9em;
}

.debug-container h3 {
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.debug-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 15px;
}

.debug-section {
    flex: 1;
    min-width: 300px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow-x: auto;
}

.debug-section:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.debug-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.debug-table {
    width: 100%;
    min-width: 500px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

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

.debug-table th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.debug-table tr:last-child td {
    border-bottom: none;
}

.debug-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.debug-table tr:hover {
    background-color: #f0f7fb;
}

.debug-table td:nth-child(2),
.debug-table td:nth-child(3),
.debug-table td:nth-child(4),
.debug-table td:nth-child(5) {
    text-align: center;
    font-weight: 500;
}

.debug-table td:nth-child(5) {
    color: #e74c3c;
}

.debug-section h4 {
    color: #3498db;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    font-size: 18px;
    position: relative;
}

.debug-section h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 50px;
    height: 2px;
    background-color: #3498db;
}

.debug-section p {
    font-size: 15px;
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debug-section p::after {
    content: attr(data-count);
    font-weight: bold;
    font-size: 18px;
    color: #2c3e50;
    background-color: #f8f9fa;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 30px;
    text-align: center;
}

.debug-section.error {
    background-color: #ffeeee;
    border-left: 4px solid #e74c3c;
}

/* Auto Post Toggle Styles */
.auto-post-toggle {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.toggle-text {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

/* Selected Jobs Box Styles */
.selected-jobs-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.selected-jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.selected-jobs-header h3 {
    color: white;
    margin: 0;
    font-size: 18px;
}

.selected-jobs-actions {
    display: flex;
    gap: 10px;
}

.selected-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.selected-job-item {
    background: white;
    padding: 12px 15px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.selected-job-title {
    flex: 1;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.remove-job-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s;
}

.remove-job-btn:hover {
    background: #c0392b;
}

/* Add to Post Button */
.add-to-post-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    margin-left: 10px;
    transition: all 0.3s;
    line-height: 1;
    display: none;
}

.add-to-post-btn.visible {
    display: inline-block;
}

.add-to-post-btn:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.add-to-post-btn.added {
    background: #27ae60;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

button#toggleCompanySelection {
    background: #3498db;
}
