* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.search-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

#searchInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 15px 30px;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    width: 100%;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(17, 153, 142, 0.4);
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.quick-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: #555;
}

.filter-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    color: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.view-toggle {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.toggle-btn:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

.filter-input {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    flex: 1;
    max-width: 300px;
}

.filter-input:focus {
    outline: none;
    border-color: #667eea;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.card-info {
    flex: 1;
}

.card-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cv-badge {
    font-size: 0.75rem;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.card-competences {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 5px;
}

.card-description {
    font-size: 0.9rem;
    color: #555;
    margin: 15px 0;
    line-height: 1.5;
}

.card-images {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.image-thumbnail {
    position: relative;
    width: 80px;
    height: 100px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.image-thumbnail:hover {
    border-color: #667eea;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.image-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    font-size: 0.7rem;
    padding: 3px;
    text-align: center;
    font-weight: 600;
}

.card-headline {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-location {
    font-size: 0.85rem;
    color: #95a5a6;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.card-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card-link:hover {
    text-decoration: underline;
}

.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table a {
    color: #667eea;
    text-decoration: none;
}

.data-table a:hover {
    text-decoration: underline;
}

.loading-section {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #e0e0e0;
    border-top-color: #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.loading-section p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.error-section {
    background: #ffe6e6;
    border: 2px solid #ff4d4d;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.error-message {
    color: #cc0000;
    font-weight: 600;
}

/* Job Status Section */
.job-status-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.status-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
}

.status-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.3rem;
}

.status-card p {
    margin: 8px 0;
    color: #555;
    font-size: 1rem;
}

.status-card span {
    font-weight: 600;
    color: #667eea;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* Secondary Button */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    color: white;
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.4);
}

/* Number Input Styling */
input[type="number"] {
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Description Modal */
.description-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s;
}

.modal-close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #000;
}

.modal-description {
    margin-top: 20px;
    line-height: 1.6;
    color: #333;
}

.modal-description .detail-row {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.modal-description .detail-label {
    font-weight: bold;
    color: #0073b1;
    display: inline-block;
    min-width: 150px;
}

.modal-description .detail-value {
    color: #333;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.btn-details {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Profile Details Modal Improvements */
.profile-details-container {
    max-height: 70vh;
    overflow-y: auto;
}

.detail-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #0073b1;
}

.section-title {
    margin: 0 0 15px 0;
    color: #0073b1;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-row.full-width {
    display: block;
}

.detail-description {
    margin-top: 8px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Experience Items */
.experience-item {
    background: white;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 3px solid #0073b1;
}

.exp-header {
    font-size: 16px;
    color: #0073b1;
    margin-bottom: 5px;
}

.exp-company {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.exp-dates, .exp-duration, .exp-location {
    font-size: 13px;
    color: #888;
    margin: 4px 0;
}

.exp-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Education Items */
.education-item {
    background: white;
    padding: 15px;
    margin-bottom: 12px;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.edu-school {
    font-size: 16px;
    color: #28a745;
    margin-bottom: 5px;
}

.edu-degree, .edu-field {
    font-size: 14px;
    color: #666;
    margin: 4px 0;
}

.edu-dates, .edu-grade {
    font-size: 13px;
    color: #888;
    margin: 4px 0;
}

.edu-description {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* Skills Grid */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.skill-badge {
    background: white;
    color: #0073b1;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    border: 1px solid #0073b1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.endorsement-count {
    background: #0073b1;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* CV Images Grid */
.cv-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.cv-image-item {
    text-align: center;
}

.cv-image-link-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: #0073b1;
    border: 2px solid #e0e0e0;
    transition: all 0.3s;
}

.cv-image-link-large:hover {
    border-color: #0073b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 115, 177, 0.2);
}

.cv-icon {
    font-size: 32px;
}

/* About Text */
.about-text {
    background: white;
    padding: 15px;
    border-radius: 6px;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

/* Table Improvements */
.table-description {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.badge-info {
    background: #0073b1;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.profile-link {
    color: #0073b1;
    text-decoration: none;
    font-weight: 500;
}

.profile-link:hover {
    text-decoration: underline;
}

.profile-link-modal {
    color: #0073b1;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.profile-link-modal:hover {
    text-decoration: underline;
}

.cv-image-link {
    display: inline-block;
    padding: 4px 8px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    margin: 0 2px;
}

.cv-image-link:hover {
    background: #218838;
}

.card-headline {
    font-style: italic;
    line-height: 1.4;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-input-small {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
    min-width: 200px;
}

.filter-input-small:focus {
    outline: none;
    border-color: #0073b1;
    box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.1);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.filter-select:hover {
    border-color: #0073b1;
}

.filter-select:focus {
    outline: none;
    border-color: #0073b1;
    box-shadow: 0 0 0 3px rgba(0, 115, 177, 0.1);
}

.btn-clear {
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    margin-top: 20px;
}

.btn-clear:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

.filter-count {
    padding: 8px 16px;
    background: #0073b1;
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 20px;
    display: inline-block;
}

/* Responsive filters */
@media (max-width: 768px) {
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-group {
        width: 100%;
        min-width: unset;
    }
    
    .filter-input-small,
    .filter-select {
        width: 100%;
    }
}
