:root {
    --tri-app-navy: #071a41;
    --tri-app-navy-light: #102d67;
    --tri-app-blue: #0d6efd;
    --tri-app-blue-soft: #e7f0ff;
    --tri-app-bg: #f7f9fc;
    --tri-app-surface: #ffffff;
    --tri-app-border: #e2e8f0;
    --tri-app-text: #101828;
    --tri-app-muted: #667085;
    --tri-app-sidebar-width: 252px;
    --tri-app-topbar-height: 72px;
}

html,
body.tri-app-body {
    min-height: 100%;
}

body.tri-app-body {
    margin: 0;
    overflow-x: hidden;
    color: var(--tri-app-text);
    background: var(--tri-app-bg);
    font-family: Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tri-app-shell {
    display: grid;
    grid-template-columns: var(--tri-app-sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.tri-app-sidebar {
    --bs-offcanvas-width: 286px;
    min-width: 0;
    color: var(--tri-app-text);
    background: var(--tri-app-surface);
    border-right: 1px solid var(--tri-app-border);
}

.tri-app-sidebar-inner {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 1rem .8rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tri-app-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 0 .25rem 1.75rem;
    padding: .6rem;
    color: var(--tri-app-navy);
    border-radius: .75rem;
    text-decoration: none;
}

.tri-app-brand:hover {
    color: var(--tri-app-blue);
    background: var(--tri-app-blue-soft);
}

.tri-app-brand-mark {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--tri-app-navy-light), var(--tri-app-blue));
    border-radius: .7rem;
    box-shadow: 0 6px 14px rgb(13 110 253 / 20%);
}

.tri-app-brand-mark svg {
    width: 28px;
    height: 28px;
}

.tri-app-brand-mark path:first-child {
    fill: currentColor;
    stroke: none;
}

.tri-app-brand-mark path:last-child {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.tri-app-brand strong,
.tri-app-brand small {
    display: block;
}

.tri-app-brand strong {
    font-size: 1.06rem;
    line-height: 1.1;
    letter-spacing: -.01em;
}

.tri-app-brand small {
    margin-top: .16rem;
    color: var(--tri-app-muted);
    font-size: .66rem;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.tri-app-nav-label {
    margin: 0 .7rem .55rem;
    color: #98a2b3;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.tri-sidebar-nav,
.tri-sidebar-subnav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tri-sidebar-item {
    margin: .16rem 0;
}

.tri-sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .65rem;
    min-height: 44px;
    padding: .68rem .78rem;
    color: #344054;
    border-radius: .58rem;
    font-size: .92rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: color .15s ease, background-color .15s ease, transform .15s ease;
}

.tri-sidebar-link::before {
    content: "";
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    border: 2px solid #98a2b3;
    border-radius: 5px;
    box-shadow: inset 0 0 0 3px #fff;
    background: #d0d5dd;
}

.tri-sidebar-link:hover,
.tri-sidebar-link:focus,
.tri-sidebar-link.is-active {
    color: #fff;
    background: var(--tri-app-blue);
    transform: translateX(2px);
}

.tri-sidebar-link:hover::before,
.tri-sidebar-link:focus::before,
.tri-sidebar-link.is-active::before {
    border-color: rgb(255 255 255 / 75%);
    box-shadow: inset 0 0 0 3px var(--tri-app-blue);
    background: #fff;
}

.tri-sidebar-item.has-children > .tri-sidebar-link::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .65;
}

.tri-sidebar-subnav {
    margin: .2rem 0 .42rem 1.65rem;
    padding-left: .72rem;
    border-left: 1px solid var(--tri-app-border);
}

.tri-sidebar-sublink {
    display: block;
    margin: .12rem 0;
    padding: .5rem .62rem;
    color: var(--tri-app-muted);
    border-radius: .48rem;
    font-size: .82rem;
    line-height: 1.25;
    text-decoration: none;
}

.tri-sidebar-sublink:hover,
.tri-sidebar-sublink:focus,
.tri-sidebar-sublink.is-active {
    color: var(--tri-app-blue);
    background: var(--tri-app-blue-soft);
}

.tri-sidebar-sublink.is-active {
    font-weight: 700;
}

.tri-sidebar-subnav-level-3 {
    margin-left: .7rem;
}

.tri-app-sidebar-footer {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-top: auto;
    padding: .85rem .75rem;
    color: var(--tri-app-muted);
    border: 1px solid var(--tri-app-border);
    border-radius: .7rem;
    background: #fbfcfe;
}

.tri-app-sidebar-footer strong,
.tri-app-sidebar-footer small {
    display: block;
}

.tri-app-sidebar-footer strong {
    color: #344054;
    font-size: .76rem;
}

.tri-app-sidebar-footer small {
    font-size: .67rem;
}

.tri-app-status-dot {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    background: #12b76a;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgb(18 183 106 / 13%);
}

.tri-app-workspace {
    min-width: 0;
    min-height: 100vh;
}

.tri-app-topbar {
    position: sticky;
    top: 0;
    z-index: 1015;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--tri-app-topbar-height);
    padding: .75rem clamp(1rem, 2.4vw, 2.4rem);
    background: rgb(255 255 255 / 92%);
    border-bottom: 1px solid var(--tri-app-border);
    box-shadow: 0 1px 8px rgb(16 24 40 / 3%);
    backdrop-filter: blur(12px);
}

.tri-app-topbar-kicker {
    color: var(--tri-app-muted);
    font-size: .67rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.tri-app-topbar-title {
    color: var(--tri-app-navy);
    font-size: 1.05rem;
    font-weight: 700;
}

.tri-app-topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.tri-app-menu-button {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 10px;
    place-content: center;
    gap: 4px;
    border: 1px solid var(--tri-app-border);
    background: #fff;
}

.tri-app-menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    background: var(--tri-app-navy);
    border-radius: 3px;
}

.tri-app-content {
    width: 100%;
    min-width: 0;
    padding: clamp(1rem, 2.2vw, 2.25rem) clamp(.85rem, 2.4vw, 2.5rem) 3rem;
}

.tri-app-content > .container,
.tri-app-content > .container-fluid,
.tri-app-content .container-fluid,
.tri-app-content .container-fluid > .container {
    width: 100%;
    max-width: none !important;
    margin-right: 0;
    margin-left: 0;
}

.tri-app-content > .container,
.tri-app-content > .container-fluid {
    padding-right: 0;
    padding-left: 0;
}

.tri-app-content .ontri-benchmark-page {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
}

.tri-app-content .ontri-analytics-shell {
    display: block;
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0 0 3rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
}

.tri-app-content .ontri-analytics-shell > .ontri-analytics-nav {
    display: none;
}

.tri-app-content .ontri-analytics-main {
    width: 100%;
    padding: 0;
}

.tri-app-content .card {
    border-color: var(--tri-app-border);
    border-radius: .9rem;
}

.tri-app-content .shadow-sm {
    box-shadow: 0 3px 12px rgb(16 24 40 / 5%) !important;
}

.tri-app-content .table-responsive {
    max-width: 100%;
}

.tri-app-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    min-height: 66px;
    padding: 1rem clamp(1rem, 2.4vw, 2.5rem);
    color: var(--tri-app-muted);
    border-top: 1px solid var(--tri-app-border);
    background: #fff;
    font-size: .78rem;
}

.tri-app-footer-content > :last-child,
.tri-app-footer-content p:last-child {
    margin-bottom: 0;
}

.min-w-0 {
    min-width: 0;
}

@media (min-width: 992px) {
    .tri-app-sidebar.offcanvas-lg {
        position: relative;
        z-index: 1020;
        visibility: visible !important;
        width: auto !important;
        transform: none !important;
    }
}

@media (max-width: 991.98px) {
    .tri-app-shell {
        display: block;
    }

    .tri-app-sidebar-inner {
        position: static;
        height: calc(100vh - 58px);
    }

    .tri-app-brand {
        display: none;
    }

    .tri-app-topbar {
        min-height: 64px;
    }

    .tri-app-content {
        padding-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .tri-app-topbar {
        padding-right: .75rem;
        padding-left: .75rem;
    }

    .tri-app-topbar-kicker {
        display: none;
    }

    .tri-app-topbar-title {
        max-width: 50vw;
        font-size: .92rem;
    }

    .tri-app-content {
        padding-right: .65rem;
        padding-left: .65rem;
    }

    .tri-app-content .card {
        border-radius: .7rem;
    }

    .tri-app-footer {
        display: block;
        padding-right: .75rem;
        padding-left: .75rem;
    }
}
