    /* Blocks all user interactions and dims the background */
    #spinner {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.6); /* 60% opacity backdrop */
        z-index: 99999; /* Ensures it sits on top of all other elements */
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: wait; /* Visual cue showing the system is busy */
    }

    /* Container box inside the overlay */
    .spinner-content {
        background: #ffffff;
        padding: 30px 40px;
        border-radius: 8px;
        text-align: center;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
        font-family: Arial, sans-serif;
    }

    .spinner-content p {
        margin: 15px 0 5px 0;
        font-size: 16px;
        font-weight: bold;
        color: #333;
    }

    .spinner-content .subtext {
        margin: 0;
        font-size: 13px;
        color: #777;
        font-weight: normal;
    }

    /* Animated Green Excel-Style Loader */
    .loader {
        border: 4px solid #f3f3f3;
        border-top: 4px solid #2ecc71;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        margin: 0 auto;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
    }