/* Jobs AI Connector - Frontend Styles */
:root {
    --jobs-primary: #6366f1;
    --jobs-secondary: #8b5cf6;
    --jobs-accent: #06b6d4;
    --jobs-success: #10b981;
    --jobs-warning: #f59e0b;
    --jobs-danger: #ef4444;
    --jobs-dark: #1e293b;
    --jobs-light: #f8fafc;
    --jobs-gradient: linear-gradient(135deg, var(--jobs-primary) 0%, var(--jobs-secondary) 100%);
    --jobs-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --jobs-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --jobs-radius: 12px;
    --jobs-radius-lg: 16px;
}

.jobs-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header Styles */
.jobs-header {
    background: var(--jobs-gradient);
    border-radius: var(--jobs-radius-lg);
    padding: 3rem 2rem;
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.jobs-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.jobs-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.jobs-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    position: relative;
}

/* Search Bar */
.jobs-search-container {
    background: white;
    border-radius: var(--jobs-radius);
    padding: 1.5rem;
    box-shadow: var(--jobs-shadow-lg);
    margin-bottom: 2rem;
}

.jobs-search-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.jobs-search-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.jobs-search-form label {
    font-weight: 600;
    color: var(--jobs-dark);
    font-size: 0.875rem;
}

.jobs-search-form input,
.jobs-search-form select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.jobs-search-form input:focus,
.jobs-search-form select:focus {
    outline: none;
    border-color: var(--jobs-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.jobs-search-form button {
    padding: 0.75rem 2rem;
    background: var(--jobs-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.jobs-search-form button:hover {
    transform: translateY(-2px);
    box-shadow: var(--jobs-shadow-lg);
}

/* Filter Tags */
.jobs-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.jobs-filter-tag {
    padding: 0.5rem 1rem;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.jobs-filter-tag:hover,
.jobs-filter-tag.active {
    background: var(--jobs-primary);
    color: white;
}

/* Jobs Grid */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Job Card */
.job-card {
    background: white;
    border-radius: var(--jobs-radius);
    padding: 1.5rem;
    box-shadow: var(--jobs-shadow);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.job-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--jobs-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.job-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--jobs-shadow-lg);
}

.job-card:hover::before {
    transform: scaleX(1);
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.job-badge {
    padding: 0.25rem 0.75rem;
    background: var(--jobs-accent);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.job-badge.urgent {
    background: var(--jobs-danger);
}

.job-type {
    padding: 0.25rem 0.75rem;
    background: #f1f5f9;
    color: var(--jobs-dark);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.job-card h3 {
    font-size: 1.25rem;
    color: var(--jobs-dark);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.job-company {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.job-company svg {
    width: 20px;
    height: 20px;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

.job-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

.job-meta-item svg {
    width: 16px;
    height: 16px;
    color: var(--jobs-primary);
}

.job-description {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.job-tag {
    padding: 0.25rem 0.5rem;
    background: #e0e7ff;
    color: var(--jobs-primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.job-card-footer {
    display: flex;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.job-card-footer button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--jobs-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--jobs-shadow);
}

.btn-secondary {
    background: #f1f5f9;
    color: var(--jobs-dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Loading State */
.jobs-loading {
    text-align: center;
    padding: 3rem;
}

.jobs-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--jobs-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.jobs-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
}

.jobs-empty svg {
    width: 80px;
    height: 80px;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.jobs-empty h3 {
    font-size: 1.5rem;
    color: var(--jobs-dark);
    margin-bottom: 0.5rem;
}

.jobs-empty p {
    color: #64748b;
}

/* Pagination */
.jobs-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.jobs-pagination button {
    padding: 0.75rem 1rem;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.jobs-pagination button:hover,
.jobs-pagination button.active {
    background: var(--jobs-primary);
    color: white;
    border-color: var(--jobs-primary);
}

.jobs-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.jobs-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.jobs-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.jobs-modal {
    background: white;
    border-radius: var(--jobs-radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.jobs-modal-overlay.active .jobs-modal {
    transform: scale(1);
}

.jobs-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jobs-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--jobs-dark);
}

.jobs-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #64748b;
    padding: 0.5rem;
    line-height: 1;
}

.jobs-modal-body {
    padding: 1.5rem;
}

.jobs-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Stats Section */
.jobs-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.jobs-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--jobs-radius);
    box-shadow: var(--jobs-shadow);
    text-align: center;
}

.jobs-stat-card .number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--jobs-primary);
}

.jobs-stat-card .label {
    color: #64748b;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .jobs-container {
        padding: 1rem;
    }

    .jobs-search-form {
        grid-template-columns: 1fr;
    }

    .jobs-grid {
        grid-template-columns: 1fr;
    }

    .jobs-header h1 {
        font-size: 1.75rem;
    }

    .jobs-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .jobs-container {
        background: #0f172a;
    }

    .jobs-search-container,
    .job-card,
    .jobs-empty {
        background: #1e293b;
        color: #e2e8f0;
    }

    .job-card h3,
    .job-description,
    .job-meta-item {
        color: #f1f5f9;
    }
}