/* ==========================================================================
   BASE STYLES
   ========================================================================== */
body {
    background-color: #edf7ea;
    background-image: linear-gradient(rgba(200, 220, 190, 0.3) 1px, transparent 1px), linear-gradient(90deg, rgba(200, 220, 190, 0.3) 1px, transparent 1px);
    background-size: 20px 20px;
}


h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

code {
    color: #c02d76;
}

/* ==========================================================================
   COMPONENT STYLES
   ========================================================================== */

/* Header Styles */
.excel-header {
    background: linear-gradient(#c1e3b3, #e6f7e0);
    color: black;
    padding: 10px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transform: translateY(-8px);
    animation: fadeInUp 0.5s ease-out forwards;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.2s ease;
}

    .excel-header h1 {
        text-align: center;
        margin: 5;
        font-size: 2.2rem;
        font-weight: 500;
    }

/* Section Styles */
.section {
    background: linear-gradient(135deg, rgba(193, 227, 179, 0.8), #e6f7e0);
    color: #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
    animation: fadeInUp 0.5s ease-out forwards;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.2s ease;
}

    .section h3 {
        color: #333;
        font-size: 1.5rem;
        margin-bottom: 10px;
        font-weight: 600;
        border-bottom: 1px solid #ddd;
        padding-bottom: 5px;
    }

    .section input[type="number"] {
        width: 100%;
        padding: 8px 12px;
        font-size: 16px;
        border: 1px solid #ced4da;
        border-radius: 4px;
        background-color: #fff;
        color: #495057;
        transition: border-color 0.3s, box-shadow 0.3s;
        margin-bottom: 10px;
    }

        .section input[type="number"]:focus {
            border-color: #258cfb;
            outline: none;
            box-shadow: 0 0 0 3px rgba(37, 140, 251, 0.2);
        }

    .section label {
        display: block;
        margin-bottom: 5px;
        font-weight: 500;
        color: #333;
        transform: translateY(-8px);
        animation: fadeInUp 0.5s ease-out forwards;
        transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.2s ease;
    }

/* Button Styles */
.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

button {
    background: #258cfb;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
}

    button:disabled {
        background: #cccccc;
        cursor: not-allowed;
    }

.button-loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid transparent;
    border-top-color: #fff; 
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

.download-btn {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    animation: spin 1s linear infinite;
    border-radius: 5px;
}

.modern-button {
    width: 100%;
    margin-top: 1rem;
    background: linear-gradient(135deg, #347C34, #90EE90);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

/* Form Elements */
.operation-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background-color: white;
    color: #495057;
    cursor: pointer;
    appearance: none;
    outline: none;
    opacity: 0;
    transform: translateY(-8px);
    animation: fadeInUp 0.5s ease-out forwards;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, border-color 0.2s ease, box-shadow 0.2s ease;
}

.modern-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}


    .modern-input:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    }

/* File Upload Styles */
.file-upload-button {
    background: center;
    width: 170px !important;
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f7eb;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    margin-bottom: 10px;
    transform: translateY(-8px);
    animation: fadeInUp 0.5s ease-out forwards;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.2s ease;
}

.file-input {
    display: none;
}

.file-selected-message {
    color: #28a745;
    margin-top: 8px;
    font-size: 14px;
}

.file-not-selected-message {
    color: #dc3545;
    margin-top: 8px;
    font-size: 14px;
    font-style: italic;
}

/* ==========================================================================
   LAYOUT STYLES
   ========================================================================== */

/* Main Container */
.main-container {
    position: relative;
    display: flex !important;
    flex-direction: !important;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 2rem;
    width: 100%;
}

.form-section {
    flex: 2;
}

.description-panel {
    flex: 1;
    min-width: 250px;
    background: linear-gradient(135deg, #e6f7e0, #c1e3b3);
    color: #333;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-8px);
    animation: fadeInUp 0.5s ease-out forwards;
    transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.2s ease;
}

.content {
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

/* Navigation Styles */
.navbar {
    background: linear-gradient(135deg, #347C34, #90EE90);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 500;
    color: #000 !important;
    padding: 0.5rem 0;
}

.nav-scrollable {
    background: linear-gradient(135deg, #006400, #e6f7e0);
    border-right: 1px solid #c1e3b3;
    width: 250px;
}

.nav-link {
    color: black !important;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .nav-link:hover {
        background-color: rgba(46, 125, 50, 0.1);
        color: #1b5e20 !important;
    }

    .nav-link.active {
        color: white !important;
    }

/* Footer Styles */
.global-footer {
    position: fixed;
    bottom: 0;
    left: 250px;
    width: calc(100% - 250px);
    text-align: center;
    background-color: transparent;
    color: #003300;
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 6px 6px 0 0;
    z-index: 10;
    pointer-events: none;
}

/* ==========================================================================
   AUTHENTICATION STYLES
   ========================================================================== */
.auth-container {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    background: none;
}

.auth-card {
    background: linear-gradient(135deg, rgba(193, 227, 179, 0.8), #e6f7e0);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 50px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 355px;
    transition: all 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    height: 60px;
    margin-bottom: 1.5rem;
}

.code-inputs {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================================================
   PROFILE & DROPDOWN STYLES
   ========================================================================== */
.profile-button-wrapper {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 1000;
}

.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
}

.profile-icon {
    width: 30px;
    height: 30px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 5px;
    background-color: white;
    min-width: 240px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    overflow: hidden;
}

.dropdown-header {
    padding: 16px;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.dropdown-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #212529;
    transition: background 0.2s;
}

    .dropdown-item:hover {
        background: #f8f9fa;
    }

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

.logout-item {
    color: #dc3545;
}

/* ==========================================================================
   UTILITY & HELPER STYLES
   ========================================================================== */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.error-message {
    color: #dc3545;
    padding: 10px;
    background: #f8d7da;
    border-radius: 5px;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* ==========================================================================
   BLOCK-SPECIFIC STYLES
   ========================================================================== */

/* Welcome Page */
.welcome-container {
    max-width: 800px;
    margin: 5rem auto;
    padding: 2rem;
    background-color: #f9f9fb;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', sans-serif;
    text-align: center;
}

/* Operations Cards */
.cards-container {
    display: grid;
    gap: 15px;
    padding: 20px;
}

.operation-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

    .operation-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

.card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

/* ==========================================================================
   ANIMATIONS & TRANSITIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }

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


@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   MEDIA QUERIES
   ========================================================================== */
@media (max-width: 768px) {
    .excel-header h1 {
        font-size: 1.8rem;
        padding: 0 15px;
    }

    .nav-scrollable {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #c1e3b3;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .global-footer {
        left: 0;
        width: 100%;
    }
}
/* ==========================================================================
   BLAZOR SPECIFIC STYLES
   ========================================================================== */

/* Loading Progress Indicator */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Blazor Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuO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IvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}