/* Team Nexgen Command Bar
   Scoped styles keep this modernization isolated from the legacy content tables. */
.tn-command-bar,
.tn-command-bar * {
    box-sizing: border-box;
}

.tn-command-bar {
    --tn-bar-ink: #dce9ff;
    --tn-bar-muted: #7f9abb;
    --tn-bar-faint: #48617e;
    --tn-bar-border: #355476;
    --tn-bar-border-bright: #547eaa;
    --tn-bar-accent: #43a7ff;
    --tn-bar-timing: 150ms;
    position: absolute;
    z-index: 1000;
    top: 77px;
    left: 0;
    width: 100%;
    padding: 8px 16px 0;
    color: var(--tn-bar-ink);
    font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

.tn-command-bar__inner {
    display: flex;
    width: 100%;
    max-width: 1380px;
    min-height: 58px;
    margin: 0 auto;
    /*
    border: 1px solid var(--tn-bar-border);
    border-top-color: var(--tn-bar-border-bright);
    border-radius: 2px;
        */
    /*
    background:
        linear-gradient(180deg, rgba(110, 161, 206, .13), transparent 12px),
        linear-gradient(90deg, rgba(17, 47, 77, .98), rgba(5, 15, 26, .98) 62%, rgba(13, 35, 59, .98));
    box-shadow:
        inset 0 1px 0 rgba(221, 241, 255, .12),
        inset 0 -4px 0 rgba(0, 0, 0, .26),
        0 10px 24px rgba(0, 0, 0, .45);*/
}

.tn-command-bar a {
    color: var(--tn-bar-ink) !important;
    text-decoration: none !important;
}

.tn-command-bar__brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    min-height: 56px;
    padding: 0 16px;
    border-right: 1px solid rgba(83, 126, 170, .42);
    background: linear-gradient(90deg, rgba(4, 13, 23, .25), rgba(30, 69, 105, .17));
    letter-spacing: .14em;
    white-space: nowrap;
}

.tn-command-bar__brand-mark {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid var(--tn-bar-accent);
    border-radius: 1px;
    color: #edf7ff;
    background: linear-gradient(135deg, #1c5d91, #071421 72%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 8px rgba(67, 167, 255, .24);
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: -.08em;
}

.tn-command-bar__brand-label {
    color: #b9d0e9;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    font-weight: 700;
}

.tn-command-bar__items {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: stretch;
}

.tn-command-menu {
    position: relative;
    display: flex;
    min-width: 0;
}

.tn-command-item {
    position: relative;
    display: flex;
    min-height: 56px;
    align-items: center;
    gap: 9px;
    padding: 0 16px;
    border-right: 1px solid rgba(83, 126, 170, .28);
    color: var(--tn-bar-ink) !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.1;
    text-transform: uppercase;
    transition: background-color var(--tn-bar-timing) linear, color var(--tn-bar-timing) linear;
    white-space: nowrap;
}

.tn-command-item:hover,
.tn-command-item:focus-visible,
.tn-command-menu.is-open > .tn-command-item {
    color: #ffffff !important;
    outline: none;
    background: linear-gradient(180deg, rgba(52, 112, 163, .34), rgba(18, 49, 80, .28));
}

.tn-command-item:focus-visible,
.tn-command-bar__mobile-toggle:focus-visible,
.tn-command-link:focus-visible {
    outline: 1px solid #b9e2ff;
    outline-offset: -3px;
}

.tn-command-item.is-active {
    color: #ffffff !important;
    background: linear-gradient(180deg, rgba(45, 103, 156, .42), rgba(17, 43, 70, .22));
}

.tn-command-item.is-active::after,
.tn-command-menu.is-active > .tn-command-item::after {
    position: absolute;
    right: 12px;
    bottom: 5px;
    left: 12px;
    height: 2px;
    background: var(--tn-bar-accent);
    box-shadow: 0 0 7px rgba(67, 167, 255, .7);
    content: "";
}

.tn-command-item__signal {
    display: block;
    width: 5px;
    height: 5px;
    flex: 0 0 5px;
    border: 1px solid var(--tn-bar-faint);
    border-radius: 50%;
    background: #18314b;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .32);
}

.tn-command-item.is-active .tn-command-item__signal,
.tn-command-menu.is-active > .tn-command-item .tn-command-item__signal {
    border-color: #b9e2ff;
    background: var(--tn-bar-accent);
    box-shadow: 0 0 7px rgba(67, 167, 255, .9);
}

.tn-command-item__chevron {
    width: 7px;
    height: 7px;
    margin: -4px 0 0 2px;
    border-right: 1px solid #a9c6e4;
    border-bottom: 1px solid #a9c6e4;
    transform: rotate(45deg);
    transition: transform var(--tn-bar-timing) linear;
}

.tn-command-menu.is-open > .tn-command-item .tn-command-item__chevron {
    margin-top: 4px;
    transform: rotate(225deg);
}

.tn-command-panel {
    position: absolute;
    top: calc(100%);
    left: -1px;
    display: grid;
    width: min(350px, calc(100vw - 24px));
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--tn-bar-border-bright);
    border-radius: 2px;
    background:
        linear-gradient(180deg, rgba(85, 137, 181, .15), transparent 24px),
        linear-gradient(135deg, rgba(11, 31, 51, .99), rgba(3, 10, 18, .99));
    box-shadow:
        inset 0 1px 0 rgba(235, 247, 255, .13),
        0 14px 30px rgba(0, 0, 0, .62),
        0 0 0 1px rgba(0, 0, 0, .36);
    opacity: 0;
    transform: translateY(-6px);
    transform-origin: top left;
    transition: opacity var(--tn-bar-timing) linear, transform var(--tn-bar-timing) ease-out;
}

.tn-command-menu--edge .tn-command-panel {
    right: 0;
    left: auto;
    transform-origin: top right;
}

.tn-command-panel:not([hidden]) {
    opacity: 1;
    transform: translateY(0);
}

.tn-command-panel[hidden] {
    display: none;
}

.tn-command-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 6px 7px;
    border-bottom: 1px solid rgba(79, 126, 167, .38);
    color: var(--tn-bar-muted);
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .12em;
}

.tn-command-link {
    position: relative;
    display: grid;
    min-height: 54px;
    grid-template-columns: 27px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border: 1px solid transparent;
    border-left: 2px solid transparent;
    background: rgba(12, 31, 50, .56);
    transition: border-color var(--tn-bar-timing) linear, background-color var(--tn-bar-timing) linear;
}

.tn-command-link:hover,
.tn-command-link:focus-visible {
    border-color: rgba(79, 146, 202, .64);
    border-left-color: var(--tn-bar-accent);
    background: linear-gradient(90deg, rgba(30, 83, 126, .52), rgba(12, 33, 54, .72));
    text-decoration: none !important;
}

.tn-command-link__icon {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border: 1px solid #41698f;
    color: #9bc7ed;
    background: #081421;
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    font-weight: 700;
}

.tn-command-link strong,
.tn-command-link small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-command-link strong {
    color: #e4f0ff;
    font-size: 12px;
    letter-spacing: .04em;
}

.tn-command-link small {
    margin-top: 4px;
    color: var(--tn-bar-muted);
    font-family: Tahoma, Arial, sans-serif;
    font-size: 10px;
    letter-spacing: .02em;
}

.tn-command-link__arrow {
    color: var(--tn-bar-accent);
    font-size: 21px;
    line-height: 1;
    text-align: right;
}

.tn-command-bar__status {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    min-width: 170px;
    padding: 0 15px;
    color: #7896b4;
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
    white-space: nowrap;
}

.tn-command-bar__status-light {
    width: 6px;
    height: 6px;
    border: 1px solid #b9e2ff;
    border-radius: 50%;
    background: var(--tn-bar-accent);
    box-shadow: 0 0 8px rgba(67, 167, 255, .9);
}

.tn-command-bar__status-divider {
    color: #3f6487;
}

.tn-command-bar__account {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: var(--tn-bar-muted);
    font: 700 9px Consolas, "Courier New", monospace;
    letter-spacing: .06em;
}

.tn-command-bar__account a,
.tn-command-bar__logout button {
    border: 0;
    padding: 0;
    color: var(--tn-bar-muted) !important;
    background: transparent;
    font: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.tn-command-bar__account a:hover,
.tn-command-bar__logout button:hover { color: var(--tn-bar-accent) !important; }

.tn-command-bar__logout { display: inline; margin: 0; }

.tn-command-bar__mobile-toggle {
    display: none;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    border: 0;
    color: var(--tn-bar-ink);
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
}

.tn-command-bar__mobile-icon {
    display: grid;
    width: 20px;
    gap: 3px;
}

.tn-command-bar__mobile-icon i {
    display: block;
    height: 2px;
    background: var(--tn-bar-accent);
    box-shadow: 0 0 5px rgba(67, 167, 255, .52);
}

.tn-command-bar__mobile-state {
    margin-left: auto;
    color: var(--tn-bar-accent);
    font-family: Consolas, "Courier New", monospace;
    font-size: 19px;
    font-weight: 400;
}

@media (max-width: 980px) {
    .tn-command-bar__brand-label {
        display: none;
    }

    .tn-command-bar__status {
        min-width: 55px;
        padding-right: 12px;
        padding-left: 10px;
    }

    .tn-command-bar__account { display: none; }

    .tn-command-bar__status /*span:not(.tn-command-bar__status-light) */ {
        display: none;
    }
}

@media (max-width: 760px) {
    .tn-command-bar {
        top: 100px;
        padding: 6px 10px 0;
    }

    .tn-command-bar--js.is-mobile-open {
        border-bottom: 1px solid var(--tn-bar-border-bright);
        background: #01070d;
        box-shadow: 0 18px 28px rgba(0, 0, 0, .55);
    }

    .tn-command-bar__inner {
        display: block;
    }

    .tn-command-bar__brand {
        display: none;
    }

    .tn-command-bar__mobile-toggle {
        display: flex;
    }

    .tn-command-bar__items {
        display: flex;
        flex-direction: column;
    }

    .tn-command-menu {
        display: block;
    }

    .tn-command-item {
        width: 100%;
        min-height: 48px;
        justify-content: flex-start;
        border-right: 0;
        border-top: 1px solid rgba(83, 126, 170, .28);
    }

    .tn-command-item__chevron {
        margin-left: auto;
    }

    .tn-command-item.is-active::after,
    .tn-command-menu.is-active > .tn-command-item::after {
        right: 12px;
        bottom: 0;
        left: 12px;
    }

    .tn-command-panel,
    .tn-command-menu--edge .tn-command-panel {
        position: static;
        width: auto;
        margin: 0 8px 8px;
        transform-origin: top center;
    }

    .tn-command-bar__status {
        display: none;
    }

    .tn-command-bar--js .tn-command-bar__items {
        display: none;
    }

    .tn-command-bar--js.is-mobile-open .tn-command-bar__items {
        display: flex;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tn-command-bar *,
    .tn-command-bar *::before,
    .tn-command-bar *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
