:root {
    --navbar-h: 0;
    --sidebar-w: 240px;
    --sidebar-w-collapsed: 76px;
    --sidebar-bg: #0b1220;
    --page-max-w: 1100px;
    /*    --table-head-bg: #0b1220;
    --table-head-text: rgba(255,255,255,.86);
    --table-head-border: rgba(255,255,255,.12);*/
    --table-head-bg: rgba(0,0,0,.03);
    --table-head-text: rgba(0,0,0,0.78);
    --table-head-border: rgba(0,0,0,0.08);
}

.app-page {
    max-width: var(--page-max-w);
    margin-left: auto;
    margin-right: auto;
}

.home-root {
    max-width: var(--page-max-w);
    margin: 0 auto;
}

html, body {
    height: 100%;
}

html.sidebar-preload .app-sidebar,
html.sidebar-preload .app-main,
html.sidebar-preload .app-footer {
    transition: none !important;
}

html.sidebar-collapsed .app-sidebar,
body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-w-collapsed);
}

body {
    padding-top: 0;
    background-color: #f6f7fb;
}

.brand-logo {
    height: 40px;
    width: auto;
}

.table > thead {
    --bs-table-bg: var(--table-head-bg);
    --bs-table-color: var(--table-head-text);
    --bs-table-border-color: var(--table-head-border);
    --bs-table-accent-bg: transparent;
}

.table > thead > tr > th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--table-head-bg) !important;
    color: var(--table-head-text) !important;
    border-bottom: 1px solid var(--table-head-border) !important;
    box-shadow: none !important;
    background-clip: padding-box;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    padding-top: .7rem;
    padding-bottom: .7rem;
    text-align: left;
}

.table thead.table-light th {
    background-color: var(--table-head-bg) !important;
    color: var(--table-head-text) !important;
    border-bottom-color: var(--table-head-border) !important;
    box-shadow: none !important;
}

.table-actions {
    white-space: nowrap;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table-zebra tbody tr:nth-of-type(odd) {
    /*--bs-table-bg: aliceblue*/
}

.table-zebra tbody tr:nth-of-type(even) {
    --bs-table-bg: rgba(0,0,0,.03);
}

.card.card-elev {
    overflow: hidden;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem rgba(13,110,253,.5);
}

.btn-ghost-light {
    color: #f8f9fa;
    background-color: transparent;
    border-color: transparent;
}

.btn-ghost-light:hover, .btn-ghost-light:focus {
    color: #212529;
    background-color: #f8f9fa;
    border-color: #f8f9fa;
}

.card .card-body h5 {
    font-weight: 600;
}

.home-root {
    max-width: var(--page-max-w);
    margin: 0 auto;
}

.btn-back {
    background: #fff;
    border: 1px solid rgba(0,0,0,.18);
    color: #212529;
}

.btn-back:hover,
.btn-back:focus {
    background: rgba(13,110,253,.08);
    border-color: rgba(13,110,253,.35);
    color: #0d6efd;
}

.btn-danger {
    border-color: rgba(220,53,69,.95);
}

.btn-danger:hover {
    filter: brightness(.93);
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255,255,255,.08);
    padding: 0;
    overflow: visible;
    z-index: 1025;
    transition: width .18s ease;
}

.app-sidebar-inner {
    height: 100%;
    padding: .75rem .6rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.app-sidebar:hover .app-sidebar-inner {
    overflow-y: auto;
}

body.sidebar-collapsed .app-sidebar {
    width: var(--sidebar-w-collapsed);
}

.app-main, .app-footer {
    transition: padding-left .18s ease;
}

@media (min-width: 992px) {
    .app-main, .app-footer {
        padding-left: var(--sidebar-w);
    }

    html.sidebar-collapsed .app-main,
    body.sidebar-collapsed .app-main,
    html.sidebar-collapsed .app-footer,
    body.sidebar-collapsed .app-footer {
        padding-left: var(--sidebar-w-collapsed);
    }
}

.app-sidebar-nav .nav-link {
    color: rgba(255,255,255,.78);
    border-radius: .65rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    margin-bottom: .25rem;
    text-decoration: none;
}

    .app-sidebar-nav .nav-link:hover {
        color: #fff;
        background: rgba(255,255,255,.08);
    }

    .app-sidebar-nav .nav-link.active {
        color: #fff;
        background: rgba(13,110,253,.25);
    }

    .app-sidebar-nav .nav-link i {
        font-size: 1.1rem;
        width: 1.25rem;
        text-align: center;
    }


html.sidebar-collapsed .app-sidebar-nav .nav-link,
body.sidebar-collapsed .app-sidebar-nav .nav-link {
    justify-content: center;
    gap: 0;
    padding: .6rem;
}

html.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-text {
    display: none;
}

.sidebar-bottom {
    padding-top: .75rem;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
}

.sidebar-user-left {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    overflow: hidden;
    flex: 0 0 auto;
}

    .sidebar-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sidebar-avatar i {
        color: rgba(255,255,255,.85);
        font-size: 1.35rem;
    }

.sidebar-user-meta {
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-user-name {
    color: rgba(255,255,255,.9);
    font-weight: 600;
    font-size: .88rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-signout-form {
    margin: 0;
}

.sidebar-user-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.sidebar-user-sub {
    color: rgba(255,255,255,.65);
    font-size: .8rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-signout-btn {
    width: 100%;
    border-color: rgba(255,255,255,.2);
    color: rgba(255,255,255,.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sidebar-signout-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.28);
    color: #fff;
}

body.sidebar-collapsed .sidebar-user-meta {
    display: none;
}

body.sidebar-collapsed .sidebar-signout-text {
    display: none;
}

.app-sidebar {
    position: fixed;
}

.sidebar-brand {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    margin-bottom: .25rem;
    text-decoration: none;
}

.sidebar-brand img {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    transition: opacity .18s ease;
    display: block;
}

.sidebar-brand .brand-full {
    max-width: 205px;
    opacity: 1;
}

.sidebar-brand .brand-mini {
    width: 56px;
    height: 56px;
    object-fit: contain;
    opacity: 0;
}

html.sidebar-collapsed .sidebar-brand .brand-full,
body.sidebar-collapsed .sidebar-brand .brand-full {
    opacity: 0;
}

html.sidebar-collapsed .sidebar-brand .brand-mini,
body.sidebar-collapsed .sidebar-brand .brand-mini {
    opacity: 1;
}

.sidebar-handle {
    position: absolute;
    top: 50%;
    right: -1px;
    transform: translateY(-50%);
    width: 16px;
    height: 96px;
    border: 1px solid rgba(255,255,255,.18);
    border-left: none;
    background: rgba(255,255,255,.10);
    border-radius: 14px 0 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    z-index: 1030;
    cursor: pointer;
}

html.sidebar-collapsed .sidebar-handle,
body.sidebar-collapsed .sidebar-handle {
    right: -16px;
    background: var(--sidebar-bg);
    opacity: 0.7;
    border-right: 1px solid rgba(255,255,255,.18);
    border-radius: 0 14px 14px 0;
}

.sidebar-handle i {
    color: #fff;
    font-size: 1.45rem;
}

.sidebar-handle::after {
    content: "";
    position: absolute;
    top: -18px;
    bottom: -18px;
    left: -12px;
    right: -18px;
    background: transparent;
}

.sidebar-handle:hover,
.sidebar-handle:focus-visible {
    background: rgba(13,110,253,.25);
    box-shadow: 0 0 0 2px rgba(13,110,253,.35);
    outline: none;
}

.app-mobile-menu {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1031;
    border-radius: 10px;
    opacity: .9;
}

    .app-mobile-menu:hover {
        opacity: 1;
    }


.sidebar-user-block {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 40px;
}

.sidebar-user-actions {
    width: 100%;
}

.sidebar-signout-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html.sidebar-collapsed .sidebar-signout-btn,
body.sidebar-collapsed .sidebar-signout-btn {
    width: 40px;
    padding-left: 0;
    padding-right: 0;
}

html.sidebar-collapsed .sidebar-user-block,
body.sidebar-collapsed .sidebar-user-block {
    align-items: center;
}

html.sidebar-collapsed .sidebar-user-actions,
body.sidebar-collapsed .sidebar-user-actions {
    display: flex;
    justify-content: center;
}

html.sidebar-collapsed .sidebar-signout-text,
body.sidebar-collapsed .sidebar-signout-text {
    display: none;
}