.employee-details-content h2 {
    font-size: 2vw;
    font-family: 'Gilroy-Bold', sans-serif;
}

#addEmployeeBtn {
    font-size: 1vw;
    padding: 10px 20px;
    background-color: #0052CC;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: 'Gilroy-Bold', sans-serif;
    margin-top: 2vw;
}

#addEmployeeBtn:hover {
    background: linear-gradient(to bottom, #0052CC 10%, #002966 100%);
    color: #ffffff;
    border-color: #0052CC;
}

/* Employee Modal Styles */
.emp-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: empFadeIn 0.3s ease;
}

@keyframes empFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.emp-modal-content {
    background-color: #e8e8e8;
    margin: 2% auto;
    border-radius: 10px;
    width: 90%;
    max-width: 60vw;
    max-height: 90vh;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    animation: empSlideDown 0.3s ease;
    display: flex;
    flex-direction: column;
}

@keyframes empSlideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Fixed Header */
.emp-modal-header {
    background: white;
    color: white;
    padding: 20px 30px;
    border-radius: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.emp-modal-header h2 {
    font-size: 1.4vw;
    color: rgb(0, 0, 0);
    margin: 0;
    font-family: 'Gilroy-Bold', sans-serif;
}

.emp-modal-close {
    color: rgb(0, 0, 0);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    line-height: 1;
}

.emp-modal-close:hover {
    opacity: 0.8;
}

/* Scrollable Body */
.emp-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.emp-form-section {
    margin-bottom: 20px;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.emp-form-section:last-of-type {
    margin-bottom: 0;
}

.emp-section-title {
    margin-bottom: 15px;
    color: black;
    font-size: 1.2vw;
    font-family: 'Gilroy-SemiBold', sans-serif;
    display: flex;
    gap: 8px;
}

.emp-section-icon {
    display: inline-block;
}

.employee-important-fill {
    color: red;
}

.emp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.emp-form-group {
    display: flex;
    flex-direction: column;
}

.emp-form-group.emp-full-width {
    grid-column: 1 / -1;
}

.emp-label {
    margin-bottom: .8vw;
    font-size: .9vw;
    font-family: 'Gilroy-SemiBold', sans-serif;
    color: #000000;
}

.emp-input,
.emp-select,
.emp-textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: .9vw;
    font-family: 'Gilroy-Medium', sans-serif;
    font-weight: 100;
    transition: border-color 0.3s ease;
}

.emp-input:focus,
.emp-select:focus,
.emp-textarea:focus {
    outline: none;
    border-color: #4a90e2;
}

.emp-radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-top: 5px;
}

.emp-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
    font-size: .9vw;
    font-family: 'Gilroy-Medium', sans-serif;
}

.emp-radio {
    cursor: pointer;
}

/* Document Upload Styles */
.emp-upload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* UPDATED: Fixed header/footer with scrollable content */
.emp-upload-item {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 2px dashed #0052CC;
    border-radius: 12px;
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    width: 100%;
    height: 40vh;
    overflow: hidden;
}

.emp-upload-item:hover {
    border-color: #003d99;
    background-color: #f0f7ff;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

/* Fixed Header at Top */
.emp-upload-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 15px 15px 10px 15px;
    background-color: #f9f9f9;
}

.emp-upload-icon img {
    width: 100%;
    height: auto;
    max-width: 20px;
}

.emp-upload-label {
    font-size: 1vw;
    font-family: 'Gilroy-medium', sans-serif;
    color: #333;
}

.emp-upload-label-new-doc {
    font-size: 1vw;
    text-align: center;
    font-family: 'Gilroy-medium', sans-serif;
    color: #333;
}

.emp-file-input {
    display: none;
}

/* Scrollable Preview Container */
.emp-preview-container {
    flex: 1;
    width: 100%;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Custom Scrollbar for Preview Container */
.emp-preview-container::-webkit-scrollbar {
    width: 6px;
}

.emp-preview-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.emp-preview-container::-webkit-scrollbar-thumb {
    background: #0052CC;
    border-radius: 10px;
}

.emp-preview-container::-webkit-scrollbar-thumb:hover {
    background: #003d99;
}

/* Fixed Button Container at Bottom */
.emp-button-container {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    align-items: center;
    justify-content: space-evenly;
    padding: 10px 15px 15px 15px;
    background-color: #f9f9f9;
}

.emp-upload-btn {
    padding: 9px 20px;
    background-color: #0052cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Gilroy-Bold', sans-serif;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.emp-upload-btn img {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
}

.emp-upload-btn:hover {
    background-color: #357abd;
}

.emp-file-name {
    font-size: 11px;
    color: #666;
    margin-top: 5px;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Preview Item */
.emp-preview-item {
    position: relative;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #fff;
    margin-bottom: 5%;
}

.emp-preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.emp-preview-file {
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f5f5f5;
}

.emp-preview-file-icon {
    font-size: 24px;
    color: #0052CC;
}

.emp-preview-file-name {
    flex: 1;
    font-size: 11px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'Gilroy-medium', sans-serif;
}

.emp-preview-cancel {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background-color: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 5;
}

.emp-preview-cancel:hover {
    background-color: rgba(255, 0, 0, 1);
    transform: scale(1.1);
}

/* Password field wrapper with eye icon */
.emp-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.emp-password-wrapper .emp-input {
    width: 100%;
    padding-right: 40px;
}

.emp-eye-icon {
    position: absolute;
    right: 10px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.emp-eye-icon:hover {
    opacity: 1;
}

/* Fixed Footer */
.emp-modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #ddd;
    background-color: #ffffff;
    border-radius: 0 0 10px 10px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.emp-form-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.emp-btn-submit,
.emp-btn-cancel {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.2vw;
    font-family: 'Gilroy-Bold', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emp-btn-submit {
    background: linear-gradient(to bottom, #0052CC 10%, #002966 100%);
    color: white;
}

.emp-btn-submit:hover {
    background-color: #164a87;
}

.emp-btn-cancel {
    background-color: #f0f0f0;
    color: #333;
}

.emp-btn-cancel:hover {
    background-color: #e0e0e0;
}

/* Responsive Design */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .employee-details-content h2 {
        font-size: 1.5rem;
    }

    #addEmployeeBtn {
        font-size: 0.875rem;
        padding: 0.75rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .emp-modal-content {
        max-width: 80vw;
        margin: 5% auto;
    }

    .emp-modal-header h2 {
        font-size: 1.125rem;
    }

    .emp-section-title {
        font-size: 1rem;
    }

    .emp-label {
        margin-bottom: 0.5rem;
        font-size: 0.875rem;
    }

    .emp-input,
    .emp-select,
    .emp-textarea {
        font-size: 0.875rem;
        padding: 0.75rem;
    }

    .emp-radio-label {
        font-size: 0.875rem;
    }

    .emp-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .emp-upload-label {
        font-size: 0.8125rem;
    }

    .emp-btn-submit,
    .emp-btn-cancel {
        font-size: 1rem;
        padding: 0.75rem 1.5625rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .employee-details-content h2 {
        font-size: 1.25rem;
    }

    #addEmployeeBtn {
        font-size: 0.8125rem;
        padding: 0.625rem 1.25rem;
        margin-top: 1.25rem;
    }

    .emp-modal-content {
        width: 90%;
        margin: 2% auto;
        max-height: 95vh;
    }

    .emp-modal-header {
        padding: 0.9375rem 1.25rem;
    }

    .emp-modal-header h2 {
        font-size: 1rem;
    }

    .emp-modal-close {
        font-size: 1.5rem;
    }

    .emp-modal-body {
        padding: 0.9375rem;
    }

    .emp-form-section {
        padding: 0.9375rem;
        margin-bottom: 0.9375rem;
    }

    .emp-section-title {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }

    .emp-form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .emp-label {
        margin-bottom: 0.375rem;
        font-size: 0.8125rem;
    }

    .emp-input,
    .emp-select,
    .emp-textarea {
        font-size: 0.8125rem;
        padding: 0.625rem;
    }

    .emp-radio-label {
        font-size: 0.8125rem;
    }

    .emp-upload-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .emp-upload-item {
        height: 35vh;
    }

    .emp-upload-head {
        padding: 12px 12px 8px 12px;
    }

    .emp-upload-label,
    .emp-upload-label-new-doc {
        font-size: 0.8125rem;
    }

    .emp-upload-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .emp-upload-btn img {
        width: 0.875rem;
        height: 0.875rem;
    }

    .emp-button-container {
        padding: 8px 12px 12px 12px;
    }

    .emp-modal-footer {
        padding: 0.9375rem 1.25rem;
    }

    .emp-form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .emp-btn-submit,
    .emp-btn-cancel {
        width: 100%;
        font-size: 0.9375rem;
        padding: 0.75rem;
    }

    .emp-preview-image {
        height: 6.25rem;
    }

    .emp-file-name,
    .emp-preview-file-name {
        font-size: 0.6875rem;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .employee-details-content h2 {
        font-size: 1.125rem;
    }

    #addEmployeeBtn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        margin-top: 1rem;
    }

    .emp-modal-content {
        width: 90%;
        margin: 8% auto;
        max-height: 90vh;
    }

    .emp-modal-header {
        padding: 0.75rem 0.9375rem;
    }

    .emp-modal-header h2 {
        font-size: 0.875rem;
    }

    .emp-modal-close {
        font-size: 1.375rem;
    }

    .emp-modal-body {
        padding: 0.75rem;
    }

    .emp-form-section {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .emp-section-title {
        font-size: 0.875rem;
        margin-bottom: 0.625rem;
        gap: 0.375rem;
    }

    .emp-section-icon img {
        max-width: 1rem;
    }

    .emp-form-row {
        gap: 0.625rem;
        margin-bottom: 0.625rem;
    }

    .emp-label {
        margin-bottom: 0.3125rem;
        font-size: 0.75rem;
    }

    .emp-input,
    .emp-select,
    .emp-textarea {
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .emp-radio-group {
        gap: 0.9375rem;
    }

    .emp-radio-label {
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .emp-upload-grid {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .emp-upload-item {
        height: 30vh;
    }

    .emp-upload-head {
        padding: 10px 10px 8px 10px;
        gap: 0.5rem;
    }

    .emp-upload-icon img {
        max-width: 1rem;
    }

    .emp-upload-label,
    .emp-upload-label-new-doc {
        font-size: 0.75rem;
    }

    .emp-button-container {
        gap: 0.375rem;
        padding: 8px 10px 10px 10px;
    }

    .emp-upload-btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.6875rem;
        gap: 0.25rem;
    }

    .emp-upload-btn img {
        width: 0.75rem;
        height: 0.75rem;
    }

    .emp-preview-image {
        height: 5rem;
    }

    .emp-preview-cancel {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 1.125rem;
    }

    .emp-file-name,
    .emp-preview-file-name {
        font-size: 0.625rem;
    }

    .emp-preview-file-icon {
        font-size: 1.25rem;
    }

    .emp-modal-footer {
        padding: 0.75rem 0.9375rem;
    }

    .emp-form-actions {
        gap: 0.625rem;
    }

    .emp-btn-submit,
    .emp-btn-cancel {
        width: 100%;
        font-size: 0.875rem;
        padding: 0.625rem;
    }

    .emp-eye-icon {
        width: 1.125rem;
        height: 1.125rem;
        right: 0.5rem;
    }
}

/* Very Small Mobile (360px and below) */
@media (max-width: 22.5rem) {
    .emp-modal-header h2 {
        font-size: 0.8125rem;
    }

    .emp-section-title {
        font-size: 0.8125rem;
    }

    .emp-label {
        font-size: 0.6875rem;
    }

    .emp-input,
    .emp-select,
    .emp-textarea {
        font-size: 0.6875rem;
        padding: 0.4375rem;
    }

    .emp-radio-label {
        font-size: 0.6875rem;
    }

    .emp-upload-item {
        height: 28vh;
    }

    .emp-upload-label,
    .emp-upload-label-new-doc {
        font-size: 0.6875rem;
    }

    .emp-upload-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.625rem;
    }

    .emp-btn-submit,
    .emp-btn-cancel {
        font-size: 0.8125rem;
        padding: 0.5625rem;
    }

    .emp-file-name,
    .emp-preview-file-name {
        font-size: 0.5625rem;
    }
}