#blazor-error-ui {
    display: none;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    left: 0;
    padding: .6rem 1.25rem .7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: .75rem;
    top: .5rem;
}

.app-loading {
    padding: 2rem;
    text-align: center;
}

.fdm-shell {
    --fdm-sidebar-width: 18rem;
    --fdm-sidebar-compact-width: 9rem;
    --fdm-topbar-height: 4.35rem;
    min-height: 100vh;
    min-height: 100dvh;
    background: #f7f3ea;
}

.fdm-topbar {
    min-height: var(--fdm-topbar-height);
    margin-bottom: 0 !important;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.fdm-topbar-brand {
    align-items: center;
    color: #102b2e;
    display: inline-flex;
    font-weight: 700;
    gap: .75rem;
    letter-spacing: .01em;
    margin-left: .75rem;
}

.fdm-sidebar-toggle {
    border-color: #d2c5ad;
    color: #274447;
    font-weight: 600;
}

.fdm-app-frame {
    display: flex;
    min-height: calc(100vh - var(--fdm-topbar-height));
    min-height: calc(100dvh - var(--fdm-topbar-height));
    min-width: 0;
}

.fdm-sidebar {
    background: linear-gradient(180deg, #0d2c2f 0%, #153f39 48%, #254b25 100%);
    border-right: 1px solid rgba(0, 0, 0, .12);
    color: #f7f3ea;
    flex: 0 0 var(--fdm-sidebar-width);
    height: calc(100vh - var(--fdm-topbar-height));
    height: calc(100dvh - var(--fdm-topbar-height));
    max-height: calc(100vh - var(--fdm-topbar-height));
    max-height: calc(100dvh - var(--fdm-topbar-height));
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 1rem .75rem;
    position: sticky;
    top: var(--fdm-topbar-height);
    transition: flex-basis .2s ease, transform .2s ease, width .2s ease;
    width: var(--fdm-sidebar-width);
    z-index: 1020;
}

.fdm-sidebar-title {
    color: rgba(255, 255, 255, .72);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .14em;
    margin: .35rem .5rem .75rem;
    text-transform: uppercase;
}

.fdm-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0 0 1rem;
}

.fdm-sidebar-nav .nav-item {
    order: unset !important;
    width: 100%;
}

.fdm-sidebar-nav .nav-link {
    border-radius: .8rem;
    color: rgba(255, 255, 255, .92) !important;
    font-weight: 650;
    line-height: 1.2;
    padding: .72rem .85rem;
    white-space: normal;
}

.fdm-sidebar-nav .nav-link:hover,
.fdm-sidebar-nav .nav-link:focus {
    background: rgba(255, 255, 255, .12);
    color: #fff !important;
}

.fdm-sidebar-nav .dropdown-menu {
    background: rgba(255, 255, 255, .08);
    border: 0;
    border-radius: .9rem;
    box-shadow: none;
    float: none;
    margin: .15rem 0 .55rem;
    padding: .45rem;
    position: static !important;
    transform: none !important;
    width: 100%;
}

.fdm-sidebar-nav .dropdown-menu.show {
    display: block;
}

.fdm-sidebar-nav .dropdown-item {
    border-radius: .65rem;
    color: rgba(255, 255, 255, .86);
    font-size: .94rem;
    padding: .55rem .72rem;
    white-space: normal;
}

.fdm-sidebar-nav .dropdown-item:hover,
.fdm-sidebar-nav .dropdown-item:focus {
    background: rgba(255, 255, 255, .16);
    color: #fff;
}

.fdm-sidebar-nav .dropdown-item.disabled {
    color: rgba(255, 255, 255, .4);
}

.fdm-sidebar-nav .dropdown-divider {
    border-color: rgba(255, 255, 255, .18);
    margin: .45rem 0;
}

.fdm-sidebar-nav .dropdown-header {
    color: rgba(255, 255, 255, .55);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    padding: .45rem .7rem .25rem;
    text-transform: uppercase;
}

.fdm-content-frame {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.fdm-main-container {
    flex: 1 0 auto;
    min-width: 0;
    padding-bottom: 2rem;
    padding-top: 1.5rem;
}

.fdm-shell.fdm-sidebar-collapsed .fdm-sidebar {
    flex-basis: var(--fdm-sidebar-compact-width);
    width: var(--fdm-sidebar-compact-width);
}

.fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-title,
.fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-menu,
.fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-toggle::after {
    display: none !important;
}

.fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .nav-link {
    font-size: .82rem;
    text-align: center;
}

@media (min-width: 768px) {
    .fdm-shell.fdm-sidebar-collapsed .fdm-app-frame {
        align-items: flex-start;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar {
        align-self: flex-start;
        height: auto;
        max-height: none;
        min-height: calc(100vh - var(--fdm-topbar-height));
        min-height: calc(100dvh - var(--fdm-topbar-height));
        overflow: visible;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .nav-item.dropdown {
        position: relative;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-menu {
        background: linear-gradient(180deg, #12383b 0%, #17483f 100%);
        border: 1px solid rgba(255, 255, 255, .14);
        border-radius: .9rem;
        box-shadow: 0 1rem 2.25rem rgba(4, 18, 20, .24);
        left: calc(100% + .55rem);
        margin: 0;
        max-height: calc(100vh - var(--fdm-topbar-height) - 2rem);
        max-height: calc(100dvh - var(--fdm-topbar-height) - 2rem);
        min-width: 18rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: absolute !important;
        top: 0;
        width: max-content;
        z-index: 1040;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-menu.show {
        display: block !important;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-header,
    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-item {
        text-align: left;
    }
}

.fdm-sidebar-backdrop {
    display: none;
}

@media (max-width: 767.98px) {
    .fdm-topbar-brand span {
        display: none;
    }

    .fdm-app-frame {
        display: block;
    }

    .fdm-sidebar,
    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar {
        flex-basis: min(84vw, 19rem);
        height: calc(100vh - var(--fdm-topbar-height));
        height: calc(100dvh - var(--fdm-topbar-height));
        max-height: calc(100vh - var(--fdm-topbar-height));
        max-height: calc(100dvh - var(--fdm-topbar-height));
        left: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
        top: var(--fdm-topbar-height);
        transform: translateX(-105%);
        width: min(84vw, 19rem);
    }

    .fdm-shell.fdm-sidebar-mobile-open .fdm-sidebar {
        transform: translateX(0);
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-title,
    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-toggle::after {
        display: block !important;
    }

    .fdm-shell.fdm-sidebar-collapsed .fdm-sidebar-nav .dropdown-menu {
        display: none;
    }

    .fdm-shell.fdm-sidebar-mobile-open .fdm-sidebar-nav .dropdown-menu.show {
        display: block !important;
    }

    .fdm-shell.fdm-sidebar-mobile-open .fdm-sidebar-nav .nav-link {
        font-size: 1rem;
        text-align: left;
    }

    .fdm-sidebar-backdrop {
        background: rgba(6, 18, 20, .42);
        border: 0;
        display: block;
        inset: var(--fdm-topbar-height) 0 0 0;
        position: fixed;
        z-index: 1015;
    }

    .fdm-main-container {
        padding-top: 1rem;
    }
}

.nfe-import-items-scroll {
    cursor: grab;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: .35rem;
    scrollbar-color: #8f8b82 #eee9de;
    scrollbar-width: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
}

.nfe-import-items-scroll.is-dragging {
    cursor: grabbing;
    user-select: none;
}

.nfe-import-items-scroll table {
    margin-bottom: .25rem;
    min-width: 1120px;
}

.nfe-import-items-scroll input,
.nfe-import-items-scroll select,
.nfe-import-items-scroll textarea,
.nfe-import-items-scroll button,
.nfe-import-items-scroll a,
.nfe-import-items-scroll label {
    cursor: auto;
}

.nfe-import-items-scroll::-webkit-scrollbar {
    height: 14px;
}

.nfe-import-items-scroll::-webkit-scrollbar-track {
    background: #eee9de;
    border-radius: 999px;
}

.nfe-import-items-scroll::-webkit-scrollbar-thumb {
    background: #8f8b82;
    border: 3px solid #eee9de;
    border-radius: 999px;
}

.nfe-import-items-scroll::-webkit-scrollbar-thumb:hover {
    background: #6f6a62;
}

.nfe-import-header-controls {
    row-gap: .75rem;
}

.nfe-import-header-controls .form-group {
    min-width: 0;
}

.nfe-import-select {
    position: relative;
    z-index: 2;
}

.nfe-import-checkbox {
    align-items: center;
    display: flex;
    min-height: calc(1.5em + .75rem + 2px);
    padding-left: 1.55rem;
    position: relative;
    z-index: 1;
}

.nfe-import-checkbox .form-check-input {
    margin-top: 0;
}

.fdm-error-report-button {
    align-items: center;
    background: #365e61;
    border: 0;
    border-radius: 999px;
    bottom: .9rem;
    box-shadow: 0 .35rem .9rem rgba(20, 55, 57, .2);
    color: #fff;
    display: inline-flex;
    height: 2.75rem;
    justify-content: center;
    padding: 0;
    position: fixed;
    right: .9rem;
    width: 2.75rem;
    z-index: 1080;
}

.fdm-error-report-button:hover,
.fdm-error-report-button:focus {
    color: #fff;
    filter: brightness(1.08);
    outline: 3px solid rgba(54, 94, 97, .25);
    outline-offset: 2px;
}

.fdm-error-report-button-alert {
    background: linear-gradient(135deg, #b23a2f 0%, #d95d39 100%);
    animation: fdm-error-report-pulse 1.8s ease-in-out infinite;
}

.fdm-error-report-button-icon {
    align-items: center;
    border: 1.5px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: .9rem;
    font-weight: 700;
    height: 1.25rem;
    justify-content: center;
    line-height: 1;
    width: 1.25rem;
}

.fdm-error-report-backdrop {
    background: rgba(7, 16, 20, .5);
    inset: 0;
    position: fixed;
    z-index: 1075;
}

.fdm-error-report-modal {
    bottom: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    position: fixed;
    right: 1.5rem;
    width: min(34rem, calc(100vw - 2rem));
    z-index: 1085;
}

.fdm-error-report-meta {
    background: #f6f3eb;
    border: 1px solid #e7dcc8;
    border-radius: .75rem;
    display: grid;
    gap: .35rem;
    padding: .75rem .9rem;
}

.fdm-error-report-preview {
    background: #fff;
    max-height: 18rem;
    object-fit: contain;
    width: 100%;
}

.fdm-error-report-list .list-group-item {
    text-align: left;
}

.fdm-error-report-list .list-group-item.active {
    background: #1f5f67;
    border-color: #1f5f67;
}

.fdm-error-report-pre {
    background: #f8f6f0;
    border: 1px solid #e7dfd1;
    border-radius: .75rem;
    margin: 0;
    max-height: 18rem;
    overflow: auto;
    padding: .9rem;
    white-space: pre-wrap;
    word-break: break-word;
}

@keyframes fdm-error-report-pulse {
    0%, 100% {
        box-shadow: 0 1rem 2rem rgba(74, 20, 20, .22);
    }

    50% {
        box-shadow: 0 1rem 2rem rgba(217, 93, 57, .4);
    }
}

@media (max-width: 767.98px) {
    .fdm-error-report-button {
        bottom: 1rem;
        right: 1rem;
    }

    .fdm-error-report-modal {
        bottom: 1rem;
        left: 1rem;
        max-height: calc(100vh - 2rem);
        right: 1rem;
        width: auto;
    }
}
