/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #FF46A2 0%, #CC3A94 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.person-name-section {
    display: flex;
    flex-direction: column;
}

.person-name-input {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    outline: none;
    transition: all 0.3s ease;
    min-width: 150px;
}

.person-name-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.person-name-input:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.25);
}

.person-name-input:focus {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.person-name-input:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #FF46A2;
    color: white;
}

.btn-primary:hover {
    background-color: #E6409B;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #FF70B8;
    color: white;
}

.btn-secondary:hover {
    background-color: #FF5CAF;
    transform: translateY(-1px);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

/* Sections */
section {
    background: white;
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: #495057;
    font-size: 1.75rem;
}

/* Employment List */
.employment-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.employment-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
    position: relative;
}

.employment-card:hover {
    border-color: #FF46A2;
    box-shadow: 0 4px 8px rgba(255, 70, 162, 0.15);
}

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

.employment-info h3 {
    color: #495057;
    margin-bottom: 0.25rem;
}

.employment-info .company {
    color: #6c757d;
    font-weight: 500;
}

.employment-info .dates {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.employment-actions {
    display: flex;
    gap: 0.5rem;
}

.assignments-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.assignments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-card {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.assignment-info h4 {
    color: #495057;
    margin-bottom: 0.25rem;
}

.assignment-info .dates {
    color: #6c757d;
    font-size: 0.75rem;
}

.assignment-description {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.assignment-actions {
    display: flex;
    gap: 0.5rem;
}

/* Drag and Drop Styles */
.assignment-card {
    cursor: move;
    user-select: none;
}

.assignment-card[draggable="true"]:hover {
    border-color: #FF46A2;
    box-shadow: 0 2px 4px rgba(255, 70, 162, 0.25);
}

.assignment-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg);
    border-color: #FF46A2;
    box-shadow: 0 4px 12px rgba(255, 70, 162, 0.3);
}

.employment-card.drag-over {
    border-color: #FF46A2;
    background-color: rgba(255, 70, 162, 0.05);
    box-shadow: 0 4px 12px rgba(255, 70, 162, 0.2);
}

.assignments-list.drag-over {
    background-color: rgba(255, 70, 162, 0.08);
    border: 2px dashed #FF46A2;
    border-radius: 8px;
    padding: 1rem;
    min-height: 60px;
    position: relative;
}

.assignments-list.drag-over::before {
    content: "Drop assignment here";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FF46A2;
    font-weight: 500;
    font-size: 0.875rem;
    pointer-events: none;
}

.assignment-card.drag-placeholder {
    background-color: rgba(255, 70, 162, 0.1);
    border: 2px dashed #FF46A2;
    opacity: 0.7;
}

.tags-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

/* Trainings section */
.trainings-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.trainings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trainings-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.training-card {
    background-color: #f0f8ff;
    border: 1px solid #cce7ff;
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.training-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.training-info h5 {
    color: #2c5282;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.training-actions {
    display: flex;
    gap: 0.5rem;
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tag.test-target-tech {
    background-color: #dbeafe;
    color: #2563eb;
}

.tag.test-tech {
    background-color: #dcfce7;
    color: #059669;
}

.tag.skill {
    background-color: #fed7aa;
    color: #ea580c;
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
    opacity: 0.7;
}

.tag-remove:hover {
    opacity: 1;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #FF46A2, #FF70B8);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #FF46A2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.75rem;
    top: 1rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF46A2;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #FF46A2;
}

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

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

.tag-filter.active,
.tag-filter:hover {
    border-color: #FF46A2;
    background-color: #FF46A2;
    color: white;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-cloud-item {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: transform 0.2s;
}

.tag-cloud-item:hover {
    transform: scale(1.05);
}

.tag-cloud-item .count {
    margin-left: 0.5rem;
    opacity: 0.7;
    font-size: 0.875rem;
}

.tag-stats {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.tag-stats .count,
.tag-stats .duration {
    font-size: 0.75rem;
    opacity: 0.7;
}

.tag-stats .duration {
    font-style: italic;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-bottom: 1rem;
}

.modal-header h3 {
    color: #495057;
}

.close {
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #adb5bd;
}

.close:hover {
    color: #495057;
}

/* Forms */
form {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FF46A2;
}

.form-group small {
    color: #6c757d;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .employment-header,
    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tag-filters {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.employment-card,
.assignment-card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty states */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* ===== FILTER FOR TAGS STYLES ===== */

/* Large modal for filter for tags */
.large-modal {
    max-width: 90vw;
    width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Tag selection grid */
.tag-selection-section h4 {
    margin-bottom: 1rem;
    color: #495057;
}

.tag-category-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.category-filter {
    padding: 0.5rem 1rem;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s;
}

.category-filter:hover {
    border-color: #FF46A2;
    color: #FF46A2;
}

.category-filter.active {
    background-color: #FF46A2;
    border-color: #FF46A2;
    color: white;
}

.tag-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.tag-checkbox-item {
    display: flex;
    align-items: center;
}

.tag-checkbox-item input[type="checkbox"] {
    margin-right: 0.5rem;
    transform: scale(1.2);
}

.tag-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex: 1;
    margin-left: 0.25rem;
}

.tag-label:hover {
    border-color: #FF46A2;
    transform: translateY(-1px);
}

.tag-count {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-left: 0.5rem;
}

.selection-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.empty-message {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 2rem;
}

/* Report results */
.report-results {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.report-summary {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.stat-label {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #495057;
}

.selected-tags-list h5 {
    margin-bottom: 0.75rem;
    color: #495057;
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.selected-tag, .matched-tag {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assignment-report-item {
    background: white;
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.assignment-report-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.assignment-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.assignment-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
    flex: 1;
}

.assignment-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-left: 1rem;
}

.assignment-meta .company {
    font-size: 0.875rem;
    color: #6c757d;
}

.assignment-meta .duration {
    font-size: 0.875rem;
    font-weight: 600;
    color: #FF46A2;
    background-color: #fff0f7;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.assignment-period {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.assignment-description {
    color: #495057;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.matched-tags {
    border-top: 1px solid #dee2e6;
    padding-top: 0.75rem;
}

.matched-tags strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 0.875rem;
}

.matched-tags .matched-tag {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.report-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6;
    margin-top: 1.5rem;
}

/* Responsive adjustments for filter for tags */
@media (max-width: 768px) {
    .large-modal {
        width: 95vw;
        max-height: 95vh;
    }
    
    .tag-selection-grid {
        grid-template-columns: 1fr;
        max-height: 250px;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .assignment-header {
        flex-direction: column;
    }
    
    .assignment-meta {
        align-items: flex-start;
        margin-left: 0;
        margin-top: 0.5rem;
    }
    
    .selection-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .report-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .tag-category-filters {
        justify-content: center;
    }
}