/* MN HRIS - Employees Specific Styles - Enterprise Edition */

/* Search filter enhancements - Glass Design */
.search-filter {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
    align-items: center;
    background: var(--glass-surface);
    backdrop-filter: blur(14px);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
}

.search-filter .btn {
    flex-shrink: 0;
    white-space: nowrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: rgba(255, 255, 255, 0.95);
}

/* Table action buttons - Modern Design */
.table-actions {
    display: flex;
    gap: 6px;
}

.btn-icon {
    padding: 8px 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.btn-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-icon:active::before {
    width: 100px;
    height: 100px;
}

.btn-icon.view {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.btn-icon.view:hover {
    background: linear-gradient(135deg, #bfdbfe, #93c5fd);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.btn-icon.edit {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-icon.edit:hover {
    background: linear-gradient(135deg, #fde68a, #fcd34d);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-icon.delete {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-icon.delete:hover {
    background: linear-gradient(135deg, #fecaca, #fca5a5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

/* Employee detail view in modal - Glass Design */
.employee-detail {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.detail-item {
    padding: var(--spacing-md);
    background: var(--glass-surface);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    font-weight: 600;
}

.detail-value {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

/* Department badge colors - Modern Glass */
.dept-hr { 
    background: linear-gradient(135deg, #fce7f3, #fbcfe8); 
    color: #be185d;
    border: 1px solid rgba(190, 24, 93, 0.2);
    backdrop-filter: blur(10px);
}
.dept-it { 
    background: linear-gradient(135deg, #dbeafe, #bfdbfe); 
    color: #1e40af;
    border: 1px solid rgba(30, 64, 175, 0.2);
    backdrop-filter: blur(10px);
}
.dept-finance { 
    background: linear-gradient(135deg, #d1fae5, #a7f3d0); 
    color: #065f46;
    border: 1px solid rgba(6, 95, 70, 0.2);
    backdrop-filter: blur(10px);
}
.dept-operations { 
    background: linear-gradient(135deg, #fef3c7, #fde68a); 
    color: #92400e;
    border: 1px solid rgba(146, 64, 14, 0.2);
    backdrop-filter: blur(10px);
}
.dept-marketing { 
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe); 
    color: #3730a3;
    border: 1px solid rgba(55, 48, 163, 0.2);
    backdrop-filter: blur(10px);
}
.dept-sales { 
    background: linear-gradient(135deg, #fce7f3, #fbcfe8); 
    color: #be185d;
    border: 1px solid rgba(190, 24, 93, 0.2);
    backdrop-filter: blur(10px);
}
.dept-engineering { 
    background: linear-gradient(135deg, #e0f2fe, #bae6fd); 
    color: #0369a1;
    border: 1px solid rgba(3, 105, 161, 0.2);
    backdrop-filter: blur(10px);
}
.dept-admin { 
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff); 
    color: #7c3aed;
    border: 1px solid rgba(124, 58, 237, 0.2);
    backdrop-filter: blur(10px);
}

/* Dropdown styles for three dots menu - Glass Design */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    padding: 10px 15px;
    background: var(--glass-surface);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    min-width: 200px;
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownSlide 0.3s ease;
}

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

.dropdown-content.active {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-glass);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background: rgba(37, 99, 235, 0.1);
    padding-left: 20px;
}

.dropdown-content a.delete-option {
    color: var(--danger-color);
}

.dropdown-content a.delete-option:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-glass);
    margin: 4px 0;
}

/* File upload area styles */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

.file-upload-area.drag-over {
    border-color: var(--primary-color);
    background: #f0f9ff;
}

/* Employee Details Modal Styles - Enterprise Glass */
.details-section {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--glass-surface);
    backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-glass);
    transition: all 0.3s ease;
}

.details-section:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.details-section h4 {
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.details-section h4::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-blue));
    border-radius: 2px;
}

.detail-item {
    margin-bottom: var(--spacing-md);
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(4px);
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.detail-item p {
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

/* Info button style */
.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

/* Form Section Styles - Modern Glass */
.form-section {
    margin-bottom: var(--spacing-xl);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.form-section-title {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 var(--spacing-md) 0;
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-blue);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-blue), var(--accent-blue));
    border-radius: 2px;
}

/* Edit Modal specific styles - Enhanced Glass */
#employee-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

#employee-modal .modal {
    max-width: 800px;
    background: var(--glass-surface);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
}

#employee-modal .modal-header {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
    border-bottom: 1px solid var(--border-glass);
    padding: var(--spacing-lg);
}

#employee-modal .modal-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.3rem;
}

#employee-modal .modal-close {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

#employee-modal .modal-close:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

/* Ensure dropdowns work in modal */
#employee-modal .form-select {
    position: relative;
    z-index: auto;
}

#employee-modal .form-select option {
    z-index: 2000;
}

/* Form section spacing */
.form-section {
    position: relative;
    z-index: 1;
}

.form-section-title {
    position: relative;
    z-index: 1;
}

/* Ensure form rows don't overlap */
.form-row {
    position: relative;
    z-index: 1;
}

/* Fix for select dropdowns in modal */
.modal-body {
    position: relative;
    z-index: 1;
}

.modal {
    position: relative;
    z-index: 1000;
}

/* Increase z-index for active sections */
.form-section:focus-within {
    z-index: 10;
}

/* ============================================
   IMPORT MODAL STYLES - Professional UI
   ============================================ */

/* Large modal for import */
.modal-lg {
    max-width: 900px;
    width: 90%;
}

/* Import info card */
.import-info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.import-info-card h4 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-info-card h4 i {
    color: #3b82f6;
}

/* Columns grid */
.columns-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.column-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    transition: all 0.2s;
}

.column-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.column-item.required {
    border-left: 3px solid #ef4444;
}

.col-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: #1e293b;
}

.col-desc {
    font-size: 0.7rem;
    color: #64748b;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s;
    position: relative;
    margin-bottom: 20px;
}

.file-upload-area.drag-over {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: scale(1.02);
}

.upload-placeholder i {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 15px;
}

.upload-placeholder p {
    margin: 0 0 10px 0;
    color: #475569;
    font-size: 1rem;
}

.upload-placeholder span {
    display: block;
    color: #94a3b8;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.file-types {
    display: block;
    margin-top: 15px;
    color: #94a3b8;
    font-size: 0.75rem;
}

/* File selected state */
.file-selected {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px 20px;
}

.file-selected i {
    font-size: 2rem;
    color: #16a34a;
}

.file-selected span {
    font-weight: 500;
    color: #1e293b;
}

.file-selected .btn-icon {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.file-selected .btn-icon:hover {
    background: #fecaca;
}

/* Import options */
.import-options {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 15px 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #92400e;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #f59e0b;
}

/* Preview iframe */
#import-preview-frame {
    width: 100%;
    height: 500px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}

/* Responsive columns grid */
@media (max-width: 768px) {
    .columns-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-lg {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .columns-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EMPLOYEE IMAGE UPLOAD STYLES
   ============================================ */

/* Primary Image Upload */
.image-upload-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.primary-image-preview {
    width: 150px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.primary-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
}

.image-placeholder i {
    font-size: 3rem;
}

.image-placeholder span {
    font-size: 0.8rem;
}

.image-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.file-hint {
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 5px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

/* Secondary Images Upload */
.secondary-images-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.secondary-images-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    min-height: 80px;
}

.no-images-text {
    color: #64748b;
    font-style: italic;
    text-align: center;
    grid-column: 1 / -1;
    padding: 20px;
}

.secondary-image-item {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.secondary-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.secondary-image-item .file-icon {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
}

.secondary-image-item .file-icon i {
    font-size: 2rem;
}

.secondary-image-item .file-icon span {
    font-size: 0.7rem;
    text-align: center;
    padding: 0 8px;
    word-break: break-all;
}

.secondary-image-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #dc2626;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.secondary-image-item:hover .remove-btn {
    opacity: 1;
}

.secondary-image-item .remove-btn:hover {
    background: #b91c1c;
}

.secondary-upload-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Image in Details Modal */
.employee-primary-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-secondary-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.details-image-item {
    border-radius: 8px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.details-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.details-image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.details-image-item .file-preview {
    width: 100%;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
    padding: 15px;
}

.details-image-item .file-preview i {
    font-size: 2.5rem;
}

.details-image-item .file-preview span {
    font-size: 0.75rem;
    text-align: center;
    word-break: break-all;
}

.details-image-item .file-name {
    padding: 8px 10px;
    font-size: 0.75rem;
    color: #475569;
    background: #f1f5f9;
    border-top: 1px solid #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .image-upload-container {
        flex-direction: column;
        align-items: center;
    }
    
    .image-upload-controls {
        width: 100%;
        align-items: center;
    }
    
    .secondary-images-list {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .secondary-image-item {
        width: 100%;
        height: 100px;
    }
    
    .details-secondary-images {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Upload progress indicator */
.upload-progress {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.upload-progress-bar {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

/* New upload indicator */
.new-upload-item {
    animation: fadeInUp 0.3s ease;
}

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

/* ============================================
   INACTIVE EMPLOYEES SECTION STYLES
   ============================================ */

/* Inactive status badges */
.status-badge.terminated,
.status-badge.awol,
.status-badge.resigned,
.status-badge.retired {
    background: #fee2e2;
    color: #991b1b;
}

/* Specific inactive status colors */
.status-badge.terminated {
    background: #fecaca;
    color: #7f1d1d;
}

.status-badge.awol {
    background: #fed7aa;
    color: #9a3412;
}

.status-badge.resigned {
    background: #e2e8f0;
    color: #475569;
}

.status-badge.retired {
    background: #ddd6fe;
    color: #5b21b6;
}

/* Inactive employees section styling */
#inactive-section {
    border-left: 4px solid #dc2626;
}

#inactive-section .card-title {
    color: #dc2626;
}

#inactive-section .card-title i {
    margin-right: 8px;
}
