﻿:root {
    --primary-color: #2b7fff;
    --rz-primary: #2b7fff !important;
    --text-color: #0F172A;
    --rz-root-font-size: 14px !important;
    --rz-body-font-size: 14px !important;
}

html, body {
    font-family: "Lexend", sans-serif;
    height: 100%;
    margin: 0;
}

#app {
    height: 100%;
    display: flex;
    background-color: #F6F6F8;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxID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}

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

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 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;
}

/* Full-screen centered loader used while Blazor app initializes */
.loader-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: transparent;
    z-index: 2000;
    pointer-events: none;
}

.loader-logo {
    width: 96px;
    height: 96px;
    object-fit: contain;
}

.loader-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--primary-color, #0F172A);
    font-weight: 700;
}

.loader-progress {
    width: min(420px, 80%);
    height: 14px;
    background: #e9eef6;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.loader-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #2b7fff), #1b6ec2);
    width: 0%;
    transition: width 0.15s linear;
}

.loader-percentage {
    font-weight: 600;
    color: #475569;
}

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

code {
    color: #c02d76;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.sidebar-navigation-item {
    .title {
        font-size: 16px;
        color: #71717b;
        font-weight: 500;
    }

    a {
        display: flex;
        padding: 10px;
        border-radius: 7.5px;
        background: transparent;
        transition: 0.3s;
        gap: 0.5rem;
        color: #475569;
        text-decoration: none !important;
        align-items: center;
        font-size: 14px;
        justify-content: center;

        .icon {
            font-size: 20px;
        }

        .text {
            flex: 1;
        }
    }

    .parent {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        max-height: 41px;
        transition: 0.3s;
        overflow: hidden;
        cursor: pointer;

        .parent-title {
            display: flex;
            padding: 10px;
            border-radius: 7.5px;
            background: transparent;
            transition: 0.3s;
            gap: 0.5rem;
            color: #475569;
            text-decoration: none !important;
            align-items: center;
            font-size: 14px;
            justify-content: center;

            .icon {
                font-size: 20px;
            }

            .text {
                flex: 1;
            }

            .icon.suffix {
                transition: 0.3s;
                transform: rotate(0deg);
            }
        }

        .children {
            padding-left: 5px;
            margin-left: 15px;
            border-left: 1px solid rgba(19, 91, 236, 0.1);
        }
    }

    .parent-title:hover {
        background: #eeefff;

        .icon, .text {
            color: var(--primary-color);
        }
    }

    .parent.openned {
        max-height: 500px;

        .parent-title {


            .icon.suffix {
                transform: rotate(180deg);
            }
        }
    }

    a:hover:not(.active) {
        background: #eeefff;

        .icon, .text {
            color: var(--primary-color);
        }
    }

    a.active {
        color: #fff;
        background: var(--primary-color);
    }

    .parent:not(.openned):has(a.active) {

        .parent-title:hover {
            background: var(--primary-color);

            .icon, .text {
                color: #fff;
            }
        }

        .parent-title {
            color: #fff;
            background: var(--primary-color);
        }
    }
}

.sidebar {
    width: 280px;
    transition: 0.3s;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
    border-right: 1px solid rgba(19, 91, 236, 0.1);

    .sidebar-header {
        display: flex;
        padding: 0.5rem;
        height: 60px;
        gap: 0.5rem;
        border-bottom: 1px solid rgba(19, 91, 236, 0.1);
        align-items: center;
        justify-content: center;

        img {
            height: 80%;
            aspect-ratio: 1;
        }

        h1 {
            font-size: 12px;
            text-align: center;
            margin: 0;
        }

        .collapse-icon {
            width: 30px;
            height: 30px;
            border-radius: 5px;
            border: 1px solid #cccccc54;
            color: #777;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;

            .icon {
                font-size: 17px;
                transition: 0.3s;
            }
        }
    }

    .sidebar-navigation {
        padding: 10px;
        width: 100%;
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}

    .sidebar.collapsed {
        width: 80px;

        .sidebar-header {
            h1 {
                display: none;
            }

            .collapse-icon {
                display: none;

                .icon {
                    transform: rotate(180deg);
                }
            }
        }
    }

        .sidebar.collapsed:hover {
            width: 280px;

            .sidebar-header {
                h1 {
                    display: block !important;
                }

                .collapse-icon {
                    display: flex !important;
                    transform: rotate(0deg);
                }
            }
        }



        .sidebar.collapsed .sidebar-navigation .sidebar-navigation-item .title,
        .sidebar.collapsed .sidebar-navigation .sidebar-navigation-item .text,
        .sidebar.collapsed .sidebar-navigation .sidebar-navigation-item .icon.suffix {
            display: none !important;
        }

        .sidebar.collapsed:hover .sidebar-navigation .sidebar-navigation-item .title,
        .sidebar.collapsed:hover .sidebar-navigation .sidebar-navigation-item .text,
        .sidebar.collapsed:hover .sidebar-navigation .sidebar-navigation-item .icon.suffix {
            display: flex !important;
        }

header, main, footer {
    width: 100%;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;

    header {
        display: flex;
        padding: 0.5rem 2rem;
        height: 60px;
        gap: 0.5rem;
        border-bottom: 1px solid rgba(19, 91, 236, 0.1);
        align-items: center;
        justify-content: space-between;
        background-color: white;

        .left-content {
            display: flex;
            gap: 10px;

            .toggle-menu {
                background-color: transparent;
                display: flex;
                justify-content: center;
                padding: 0.25rem;
                border: 1px solid #6d6d6d;
                outline: none;
                border-radius: 5px;
                display: none;

                .icon {
                    font-size: 15px;
                    color: #6d6d6d;
                }
            }
        }

        .profile {
            display: flex;
            gap: 10px;
            height: 100%;

            .info {
                margin: 0;
                font-size: 14px;
                color: #64748B;

                b {
                    color: var(--text-color);
                    font-weight: 500;
                }
            }

            img {
                height: 100%;
                aspect-ratio: 1;
                border-radius: 1000px;
            }
        }
    }

    footer {
        color: #ddd;
        font-weight: 400;
        font-size: 11px;
        display: flex;
        padding: 0.5rem;
        height: 40px;
        background-color: white;
        align-items: center;
        justify-content: space-between;
    }

    main {
        flex: 1;
        padding: 2rem;
    }
}

.mobile-menu-backdrop {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    padding-left: 280px;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    cursor: pointer;

    .icon {
        font-size: 50px;
        color: white;
    }
}


/* Overlay loading */
.r-overlay-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.r-spinner-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100px;
    height: 100px;
}

.r-spinner {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid white;
    border-radius: 50%;
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100px;
    height: 100px;
    animation: r-spin 1s linear infinite;
}

.r-spinner-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

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

.r-message {
    color: white;
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* RECONNECT MODAL */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}


#components-reconnect-modal {
    background-color: white;
    width: 20rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.5rem;
    box-shadow: 0 3px 6px 2px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;

    &[open] {
        animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
        animation-fill-mode: both;
    }
}

    #components-reconnect-modal::backdrop {
        background-color: rgba(0, 0, 0, 0.4);
        animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
        opacity: 1;
    }

@keyframes components-reconnect-modal-slideUp {
    0% {
        transform: translateY(30px) scale(0.95);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
}

#components-reconnect-modal button {
    border: 0;
    background-color: #6b9ed2;
    color: white;
    padding: 4px 24px;
    border-radius: 4px;
}

    #components-reconnect-modal button:hover {
        background-color: #3b6ea2;
    }

    #components-reconnect-modal button:active {
        background-color: #6b9ed2;
    }

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

    .components-rejoining-animation div {
        position: absolute;
        border: 3px solid #0087ff;
        opacity: 1;
        border-radius: 50%;
        animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    }

        .components-rejoining-animation div:nth-child(2) {
            animation-delay: -0.5s;
        }

@keyframes components-rejoining-animation {
    0% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    4.9% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 0;
    }

    5% {
        top: 40px;
        left: 40px;
        width: 0;
        height: 0;
        opacity: 1;
    }

    100% {
        top: 0px;
        left: 0px;
        width: 80px;
        height: 80px;
        opacity: 0;
    }
}


/* CUSTOM TABLE */
.custom-table {
    width: 100%;
    background-color: #F1F5F9;
    border: 1px solid rgba(19, 91, 236, 0.05);
    border-radius: 10px;
    overflow: hidden;

    .table-header {
        width: 100%;
        display: flex;
        align-items: center;
        padding: 1rem;
        border-bottom: 1px solid rgba(19, 91, 236, 0.05);

        .title {
            font-size: 18px;
            font-weight: 500;
        }

        .table-toolbar {
            flex: 1;
            display: flex;
            justify-content: end;
            gap: 0.5rem;
        }
    }

    table {
        width: 100%;
        background-color: #F8FAFC;


        th {
            color: #64748B;
            font-weight: 500;
            font-size: 16px;
            padding: 10px;
        }

        td {
            color: var(--text-color);
            padding: 10px;
        }

        tr {
            border-bottom: 1px solid rgba(19, 91, 236, 0.05);
        }
    }

    .table-footer-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;

        .table-statistic {
            margin: 0;
            font-size: 12px;
            font-weight: 400;
        }

        .table-pagination {
            display: flex;
            gap: 10px;

            .table-paging-btn {
                box-shadow: none;
                background: transparent;
                border: 1px solid var(--primary-color);
                color: var(--primary-color);
                transition: 0.3s;
            }

                .table-paging-btn:enabled:hover, .table-paging-btn.active {
                    box-shadow: none;
                    background-color: var(--primary-color);
                    color: white;
                }
        }
    }
}

.custom-card {
    background-color: white;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(19, 91, 236, 0.05);
}

.unauthorize-overlay {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 400px;
    background-color: rgba(255, 255, 255, 0.5);

    img {
        height: 80px;
    }

    h2 {
        font-size: 20px;
        margin: 0;
    }

    h5 {
        font-size: 16px;
        margin: 0;
    }
}

.table-card-container {
    display: flex;
    flex-direction: column;
    gap: 10px;

    .table-cell-data-card {
        background-color: #F8FAFC;
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid rgba(19, 91, 236, 0.2);
        border-top: 1px solid rgba(19, 91, 236, 0.2);

        .table-cell-data-card-content {
            display: flex;
            gap: 15px;
            padding: 5px 10px;

            .header {
                color: #64748B;
                font-weight: 500;
                font-size: 16px;
            }

            p {
                flex: 1;
                text-align: end;
                margin: 0;
            }
        }

            .table-cell-data-card-content:nth-child(even) {
                background-color: rgba(0, 0, 0, 0.05);
            }
    }
}


@media(max-width: 996px) {
    .sidebar {
        width: 0px;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 20;

        .sidebar-header {
            .collapse-icon {
                display: none;
            }
        }
    }

    body:has(.main-content.menu-mobile) .sidebar {
        width: 280px;
    }

    .main-content {
        header {
            padding: 0.5rem 1rem;

            .left-content {
                .toggle-menu {
                    display: flex;
                }
            }

            .profile {
                .info {
                    display: none;
                }
            }
        }

        main {
            padding: 1rem;
        }
    }

    .table-header, .table-footer-row {
        flex-direction: column;
        gap: 10px;
    }
}
