#main-container {
    display: flex;
    flex-direction: column;

    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;

    background-color: #2b263a;
    color: #E8ECF0;

    #body-container {
        display: flex;
        flex-direction: row;
        flex-grow: 1;

        overflow: hidden;

        > div:nth-child(2) {
            flex-grow: 1;

            height: 100%;
            overflow: hidden;

            #_pages_content {
                height: 100%;
                width: 100%;
                padding: 6rem 8rem 2rem 10rem;

                background-color: #11171D;
                border-radius: .5rem 0 0 0;

                overflow-y: auto;
            }
        }
    }
}

#sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    flex-shrink: 0;

    padding: .9rem;
    padding-top: 0;

    #btn-create, #btn-quick-demo, .nav-link {
        border-radius: 5px;
    }
    
    #btn-create, #btn-quick-demo {
        padding: .3rem 1rem;
    }

    #btn-create {
        background-color: rgba(112, 36, 230, 0.5);
    }

    #btn-quick-demo {
        background-color: rgba(217, 70, 239, 0.1);
    }

    .nav-link {
        margin-bottom: .25rem;
        padding: .4rem 1rem;
        padding-left: 1.2rem;

        &.active {
            background: #332e49;
        }

        &:hover {
            background: #3d3757;
        }
    }
}

#navbar {
    display: block;
    margin: 0;
    padding: 0;

    #branding-container {
        display: flex;
        align-items: center;
        padding: 1rem .9rem;
    }

    .dropdown {
        min-width: 300px;
        max-width: 440px;
        width: 100%;
        color: black;
    }

    .navbar-cta {
        font-size: 0.78rem;
        border-radius: 5px;
        background-color: rgba(255, 193, 7, 0.12);
        border: 1px solid rgba(255, 193, 7, 0.35);
        padding: 0.35rem 0.85rem;
        transition: all 0.2s ease-in-out;
        cursor: pointer;

        &:hover {
            background-color: rgba(255, 193, 7, 0.22) !important;
            border-color: rgba(255, 193, 7, 0.55) !important;
            box-shadow: 0 2px 8px rgba(255, 193, 7, 0.15);
        }
    }

    .navbar-doc-btn {
        font-size: 0.78rem;
        border-radius: 5px;
        background-color: rgba(255, 255, 255, 0.07);
        border: 1px solid rgba(255, 255, 255, 0.15);
        padding: 0.35rem 0.85rem;
        color: #adb5bd;
        transition: all 0.2s ease-in-out;
        cursor: pointer;

        &:hover {
            background-color: rgba(255, 255, 255, 0.12) !important;
            border-color: rgba(255, 255, 255, 0.25) !important;
            color: #f8f9fa !important;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        }
    }
}

#navbar i, #sidebar .nav-link {
    --bs-text-opacity: .75;
}

#navbar #branding-container, #sidebar {
    width: 200px;
    box-sizing: border-box;
}

#observer-container {
    display: flex;
    gap: 2rem;
    flex: 1;

    overflow: hidden;

    #observer-toolbar {
        height: 100%;
        width: fit-content;
        background: #2b263a;
        box-sizing: border-box;
        padding: 10px;

        .btn {
            font-size: 20px;
            padding: 0;
        }
    }

    #observer-table-container {
        display: flex;
        flex-direction: column;

        #observer-table {
            flex: 1;
            min-width: 300px;
            height: 100%;
        }
    }
}

.ag-theme-alpine-dark {
    --ag-font-size: 13px;
    --ag-font-family: inherit;
    --ag-foreground-color: #F1F5F9;
    --ag-header-foreground-color: #FFFFFF;
    --ag-data-color: #F1F5F9;
    --ag-secondary-foreground-color: #CBD5E1;
    --ag-icon-color: #CBD5E1;
    --ag-header-cell-hover-background-color: #332e49;
    --ag-header-background-color: #1b1824;
    --ag-background-color: #221e2e;
    --ag-odd-row-background-color: #1f1a2a;
    --ag-row-hover-color: #332e49;
    --ag-selected-row-background-color: rgba(112, 36, 230, 0.35);
    --ag-border-color: #37334a;
    --ag-row-border-color: #2b263a;
    border: 1px solid #37334a;
    border-radius: 8px;
    overflow: hidden;
}

.ag-theme-alpine-dark .ag-cell {
    color: #F1F5F9 !important;
}

.ag-theme-alpine-dark .ag-header-cell-text {
    color: #FFFFFF !important;
    font-weight: 600;
}

.ag-theme-alpine-dark .ag-paging-panel {
    color: #CBD5E1 !important;
}

.ag-theme-alpine-dark .ag-paging-panel select,
.ag-theme-alpine-dark .ag-paging-panel span,
.ag-theme-alpine-dark .ag-paging-panel button {
    color: #CBD5E1 !important;
}

.ag-theme-alpine-dark .ag-icon {
    color: #CBD5E1;
}

.truncated-table {
    width: 100%;

    font-size: .75rem;
    cursor: default;

    thead th, tbody td {
        padding: 0.5rem;
    }

    tbody td {
        max-width: 200px;
    }
}

.dash-spreadsheet tr:hover td.dash-cell {
    background: #3d3757 !important;
}

.dash-tooltip {
    border: none !important;
    outline: none !important;
    background-color: #2b263a !important;
    color: white !important;
}

.dash-table-tooltip {
    background-color: #2b263a !important;
    color: white !important;
    padding: 1rem !important;
    min-width: max-content !important;
}

._dash-loading-callback::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #5b21b6 0%, #cc55f3 50%, #5b21b6 100%);
    background-size: 200% 100%;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    animation: wave-bar 1.5s linear 250ms infinite, show-bar 0.15s ease-in 250ms forwards;
}

@keyframes wave-bar {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

@keyframes show-bar {
    to { opacity: 1; }
}
