/*Login*/
.login {
    background: var(--Main);
    display: flex;
    flex-direction: row;
    gap: 5%;
    position: relative;
    padding: 5%;
}

.loginLeft {
    width: calc(100% - 400px);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--White);
    text-align: left;
}

.loginLeft-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: .5;
    mix-blend-mode: screen;
    pointer-events: none;
}

.loginLeft-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.loginLeft-logo {
    width: 50px;
    height: auto;
}

.loginLeft h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1em;
}

.loginRight {
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    backdrop-filter: blur(10px);
    background: var(--Glass);
    border-radius: 20px;

}

/*403 & 404 Error Pages*/
.errorPage {
    background: var(--Main);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.errorCard {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 48px 32px;
    backdrop-filter: blur(10px);
    background: var(--Glass);
    border-radius: 20px;
}

.errorRedirect-icon {
    animation: errorRedirectSpin 1.5s linear infinite;
}

@keyframes errorRedirectSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/*Main / System Shell*/
.appShell {
    display: flex;
    align-items: stretch;
    background: var(--G02);
    color: var(--White);
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, .15);
    border-right: 1px solid rgba(255, 255, 255, .1);
    overflow-y: auto;
    overflow-x: hidden;
    transition: width .3s ease;
}

.sidebar-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    flex-shrink: 0;
}

.sidebarToggle {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--White);
    background: rgba(255, 255, 255, .1);
    transition: background .2s ease;
}

.sidebarToggle:hover {
    background: rgba(255, 255, 255, .2);
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-nav {
    flex: 1;
    padding: 8px 12px 20px;
}

.navList {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.navLink,
.navGroupToggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--White);
    font-size: .9rem;
    white-space: nowrap;
    background: transparent;
    transition: background .2s ease;
}

.navLink:hover,
.navGroupToggle:hover {
    background: rgba(255, 255, 255, .12);
}

.navLink.is-active {
    background: rgba(255, 255, 255, .18);
    font-weight: 600;
}

.navIcon {
    width: 18px;
    flex-shrink: 0;
    text-align: center;
    opacity: .9;
}

.navLabel {
    flex: 1;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navChevron {
    flex-shrink: 0;
    font-size: .7rem;
    opacity: .7;
    transition: transform .2s ease;
}

.navGroup.is-open .navChevron {
    transform: rotate(180deg);
}

.navSubmenu {
    list-style: none;
    max-height: 0;
    overflow: hidden;
    padding-left: 30px;
    transition: max-height .3s ease;
}

.navGroup.is-open .navSubmenu {
    max-height: 400px;
}

.navSubLink {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--White);
    opacity: .8;
    font-size: .85rem;
    white-space: nowrap;
    transition: background .2s ease, opacity .2s ease;
}

.navSubLink:hover {
    background: rgba(255, 255, 255, .12);
    opacity: 1;
}

.navSubLink.is-active {
    background: rgba(255, 255, 255, .18);
    opacity: 1;
    font-weight: 600;
}

/*A group holding the current page stays highlighted while collapsed, so you
  can still tell which group to open. Once it IS open, the child's own
  .is-active is doing that job — highlighting the toggle too made it read as
  a second selected item next to the real one.*/
.navGroup.is-current:not(.is-open) > .navGroupToggle {
    background: rgba(255, 255, 255, .12);
    font-weight: 600;
}

/*Off-canvas trigger + backdrop — only ever visible below 1024px (see RWD)*/
.sidebarOpen {
    display: none;
    width: 34px;
    height: 34px;
    flex: none;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    border-radius: 8px;
    color: var(--White);
    background: rgba(255, 255, 255, .18);
}

.sidebarBackdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(20, 8, 40, .45);
}

/*Collapsed sidebar*/
.sidebar.is-collapsed {
    width: 76px;
}

.sidebar.is-collapsed .sidebar-brand,
.sidebar.is-collapsed .navLabel,
.sidebar.is-collapsed .navChevron,
.sidebar.is-collapsed .navSubmenu {
    display: none;
}

.sidebar.is-collapsed .navLink,
.sidebar.is-collapsed .navGroupToggle {
    justify-content: center;
    padding: 10px;
}

.appMain {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--G01);
    color: var(--Black);
}

.dropdown {
    position: relative;
}

.dropdownToggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--White);
    font-size: .85rem;
    background: rgba(255, 255, 255, .12);
    transition: background .2s ease;
}

.dropdownToggle:hover {
    background: rgba(255, 255, 255, .22);
}

.dropdownChevron {
    font-size: .65rem;
    opacity: .7;
    transition: transform .2s ease;
}

.dropdown.is-open .dropdownChevron {
    transform: rotate(180deg);
}

.dropdownMenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    list-style: none;
    background: var(--White);
    border: 1px solid rgba(0, 0, 0, .1);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 20;
}

.dropdownMenu-right {
    left: auto;
    right: 0;
}

.dropdown.is-open .dropdownMenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdownItem {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--Black);
    font-size: .85rem;
    white-space: nowrap;
    text-align: left;
    transition: background .2s ease;
}

.dropdownItem:hover {
    background: rgba(0, 0, 0, .06);
}

.appContent {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: transparent;
    line-height: normal;
    white-space: normal;
}

/*Vertical rhythm between top-level page sections.

  Page blocks mount a card straight after a header or another card, and
  without this every page has to remember its own spacing — which is exactly
  what kept getting missed (headers and query bars ended up flush against
  the table below). Adjacent margins collapse, so a page can still ask for
  more, never less.*/
.appContent > .dashCard,
.appContent > .dashGrid,
.appContent > .nvGrid,
.appContent > .thEmpty {
    margin-top: 20px;
}

/*Main / Dashboard*/
.dashTopbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 20px;
    border-radius: 20px;
    background: linear-gradient(90deg, rgba(141, 74, 242, 1) 0%, rgba(88, 92, 253, 1) 100%);
    color: var(--White);
    box-shadow: 0 12px 40px rgba(84, 55, 143, .18);
}

.dashTopbar-account {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: .85rem;
    color: var(--White);
}

.dashTopbar-actionBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--White);
    font-size: .85rem;
    background: rgba(255, 255, 255, .12);
    transition: background .2s ease;
}

.dashTopbar-actionBtn:hover {
    background: rgba(255, 255, 255, .22);
}

.dashTopbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashTopbar-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, .25);
    flex: none;
}

.modalOverlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(20, 10, 40, .55);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s ease;
}

.modalOverlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modalCard {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    padding: 28px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
    transform: translateY(-10px);
    transition: transform .2s ease;
}

.modalOverlay.is-open .modalCard {
    transform: translateY(0);
}

.modalCard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modalCard-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--Black);
}

.modalCard-close {
    width: 32px;
    height: 32px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: rgba(0, 0, 0, .5);
    background: rgba(0, 0, 0, .05);
    transition: background .2s ease;
}

.modalCard-close:hover {
    background: rgba(0, 0, 0, .1);
}

.modalForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modalField {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modalField label {
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--Black);
}

.modalInput {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .12);
    background: rgba(0, 0, 0, .03);
    padding: 10px 40px 10px 14px;
    color: var(--Black);
    font-size: .9rem;
}

.modalInput:focus {
    outline: none;
    border-color: var(--Main);
    box-shadow: 0 0 0 3px rgba(84, 55, 143, .15);
}

.modalInput-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 0, 0, .4);
}

.modalInput-eye:hover {
    color: var(--Main);
}

.modalActions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 8px;
}

.modalCancelBtn {
    font-size: .9rem;
    font-weight: 600;
    color: rgba(0, 0, 0, .5);
    transition: color .2s ease;
}

.modalCancelBtn:hover {
    color: var(--Black);
}

.modalSubmitBtn {
    padding: 10px 22px;
    border-radius: 10px;
    background: var(--Main);
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    transition: background .2s ease;
}

.modalSubmitBtn:hover {
    background: var(--Secondary);
}

.dashHero {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
    background: var(--G02);
    border-radius: 28px;
    padding: 34px 36px;
    color: var(--White);
    box-shadow: 0 12px 40px rgba(84, 55, 143, .25);
}

.dashHero-col3 {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashHero-left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    min-width: 0;
}

.dashHero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    padding: 6px 14px;
    background-color: rgba(66, 35, 113, .25);
}

.dashHero-badgeDot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7CFFB2;
    flex: none;
}

.dashHero-title {
    margin: 16px 0 10px;
    font-size: 42px;
    line-height: 1.1;
    font-weight: 900;
}

.dashHero-desc {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, .78);
}

.dashHero-stats {
    display: flex;
    gap: 14px;
}

.dashStat {
    flex: 1;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 16px;
    padding: 14px 18px;
    background-color: rgba(66, 35, 113, .25);
}

.dashStat-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .7);
}

.dashStat-value {
    font-size: 30px;
    font-weight: 900;
    margin: 4px 0 6px;
}

.dashStat-unit {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, .7);
}

.dashStat-sub {
    font-size: 12px;
    color: rgba(255, 255, 255, .7);
}

.dashHero-panel {
    border-radius: 20px;
    padding: 20px 22px;
    color: var(--Black);
    display: flex;
    flex-direction: column;
    gap: 16px;
    background-color: rgba(66, 35, 113, .25);
}

.dashHero-panelHeader {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.dashHero-panelTitle {
    font-size: 15px;
    font-weight: 700;
    color: var(--White);
}

.dashHero-panelMeta {
    font-size: 11px;
    color: var(--White);
}

.dashHero-panelBody {
    display: flex;
    align-items: center;
    gap: 24px;
}

.donutWrap {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    flex: none;
}

.donutWrap-lg {
    width: 200px;
    height: 200px;
}

.donutRing {
    width: 150px;
    height: 150px;
    border-radius: 50%;
}

.donutRing-lg {
    width: 200px;
    height: 200px;
}

.donutWrap-lg .donutHole {
    inset: 32px;
}

.donutHole {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.donutHole-value {
    font-size: 24px;
    font-weight: 900;
}

.donutHole-label {
    font-size: 10px;
    color: rgba(0, 0, 0, .5);
}

.legendList {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.legendItem {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--White);
}

.legendDot {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    flex: none;
}

.dashGrid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.dashCard {
    background: #fff;
    border-radius: 24px;
    padding: 22px 26px;
    box-shadow: 0 2px 10px rgba(84, 55, 143, .06);
}

.dashCard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.dashCard-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
}

.dashTable-head {
    display: grid;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .45);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

.dashTable-row {
    display: grid;
    align-items: center;
    font-size: 13px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.dashTable-row:last-child {
    border-bottom: 0;
}

.dashCode {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    background: var(--Bg);
    color: var(--Main);
    border-radius: 6px;
    padding: 3px 8px;
}

.barChart {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    height: 160px;
    padding: 0 6px;
}

.barChart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.barChart-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--Main);
}

.barChart-bar {
    width: 100%;
    max-width: 44px;
    border-radius: 10px 10px 4px 4px;
    background: var(--G02);
}

.barChart-labels {
    display: flex;
    gap: 20px;
    padding: 8px 6px 0;
    font-size: 11px;
    color: rgba(0, 0, 0, .55);
}

.barChart-labels span {
    flex: 1;
    text-align: center;
    font-family: ui-monospace, Menlo, monospace;
}

.progressRow {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 0 14px;
    align-items: center;
    font-size: 13px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.progressRow:last-child {
    border-bottom: 0;
}

.progressTrack {
    height: 8px;
    border-radius: 999px;
    background: var(--Bg);
}

.progressFill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--Secondary), var(--Third));
}

.progressValue {
    font-weight: 700;
    color: var(--Main);
}

.tabPill {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid rgba(84, 55, 143, .25);
    background: #fff;
    color: var(--Main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s ease, color .15s ease;
}

.tabPill.is-active {
    border-color: var(--Main);
    background: var(--Main);
    color: #fff;
}

.trendAxis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 260px;
    font-size: 10px;
    color: rgba(0, 0, 0, .4);
    text-align: right;
    min-width: 34px;
}

/*Alert Center*/
.alertPageHeader {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-top: 4px;
}

.alertPageTitle {
    font-size: 26px;
    font-weight: 800;
    color: var(--Main);
}

.alertPageMeta {
    font-size: 12px;
    color: rgba(0, 0, 0, .45);
}

/*Chart cards (clickable, drill-down)*/
.alertChartCard {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.alertChartCard:hover {
    box-shadow: 0 6px 18px rgba(84, 55, 143, .14);
}

.alertChartGrid.has-selection .alertChartCard {
    opacity: .45;
}

.alertChartGrid.has-selection .alertChartCard.is-selected {
    opacity: 1;
    border-color: var(--Secondary);
    box-shadow: 0 6px 22px rgba(141, 74, 242, .22);
}

.alertChartCard-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.alertChartBadge {
    display: none;
    align-items: center;
    gap: 6px;
    flex: none;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--Main);
    background: rgba(141, 74, 242, .12);
}

.alertChartCard.is-selected .alertChartBadge {
    display: inline-flex;
}

.alertDonutRow {
    display: flex;
    align-items: center;
    gap: 18px;
}

.alertDonut {
    width: 132px;
    height: 132px;
    margin: 0;
}

.alertDonut .donutRing {
    width: 132px;
    height: 132px;
}

.alertDonut .donutHole {
    inset: 26px;
}

.alertDonut .donutHole-value {
    font-size: 20px;
}

.alertLegend {
    gap: 6px;
}

.alertLegend .legendItem {
    color: var(--Black);
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease;
}

.alertLegend .legendItem:hover {
    background: rgba(141, 74, 242, .1);
}

.alertLegend .legendItem.is-active {
    background: rgba(141, 74, 242, .16);
    font-weight: 700;
}

.alertLegend .legendCount {
    margin-left: auto;
    color: rgba(0, 0, 0, .5);
}


/*Main / Log Explorer*/
.logExplorer .nvPageHeader {
    margin-bottom: 6px;
}

.logExplorer #logStatsPanel {
    display: none;
}

.logDistCard {
    margin-bottom: 20px;
}

.logDistHint {
    font-size: 11.5px;
    color: rgba(0, 0, 0, .4);
    line-height: normal;
}

.logDist {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 140px;
    margin-top: 14px;
}

.logDist-empty {
    width: 100%;
    align-self: center;
    text-align: center;
    font-size: 12px;
    color: rgba(0, 0, 0, .35);
}

.logDistBar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    height: 100%;
    padding: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s ease;
}

.logDistBar:hover {
    background: rgba(141, 74, 242, .1);
}

.logDistBar.is-active {
    background: rgba(141, 74, 242, .18);
}

.logDistBar-fill {
    display: block;
    width: 100%;
    min-height: 2px;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, var(--Secondary), var(--Third));
    transition: height .25s ease;
}

.logDistBar.is-active .logDistBar-fill {
    background: linear-gradient(180deg, var(--Main), var(--Secondary));
}

.logDistBar-label {
    margin-top: 8px;
    font-size: 10.5px;
    line-height: normal;
    text-align: center;
    color: rgba(0, 0, 0, .45);
}

/*Main / Log Explorer — Quick Stats component editor*/
.qsLayout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 24px;
    align-items: start;
}

.qsPane-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    color: rgba(0, 0, 0, .45);
}

/* The absolute range the preview really covers — a relative preset on its
   own never tells you which rows you are looking at. */
.qsPane-range {
    font-weight: 400;
    font-size: 11.5px;
    color: rgba(0, 0, 0, .4);
}

.qsChips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.qsPreview-box {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 460px;
    padding: 20px;
    border-radius: 18px;
    border: 1px dashed rgba(84, 55, 143, .25);
    background: #fff;
}

.qsPreview-box.has-chart {
    align-items: stretch;
    flex-direction: column;
    border-style: solid;
    border-color: rgba(84, 55, 143, .12);
}

.qsPreview-empty {
    font-size: 13px;
    line-height: normal;
    color: rgba(0, 0, 0, .4);
}

/*Editor cards*/
.qsCard {
    margin-bottom: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(84, 55, 143, .1);
    line-height: normal;
}

.qsCard-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.qsCard-actions {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.qsCard-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--Black);
}

.qsCard > .qsCard-title {
    display: block;
    margin-bottom: 14px;
}

.qsCard-sub {
    font-size: 11.5px;
    color: rgba(0, 0, 0, .4);
}

.qsAddLink {
    background: none;
    color: var(--Secondary);
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.qsAddLink:hover {
    text-decoration: underline;
}

.qsRow {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.qsRow:last-child {
    margin-bottom: 0;
}

.qsRow > label {
    font-size: 12.5px;
    color: rgba(0, 0, 0, .6);
}

.qsCard select,
.qsCard input[type="text"],
.qsCard input[type="number"] {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--Black);
}

/* Same chevron treatment as the component selects (see components.css) */
.qsCard select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 32px;
    background-image: var(--nvSelectArrow);
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 11px;
}

.qsCard select:focus,
.qsCard input:focus {
    outline: none;
    border-color: var(--Secondary);
}

.qsCard select:disabled,
.qsCard input:disabled {
    background: rgba(0, 0, 0, .04);
    color: rgba(0, 0, 0, .35);
}

.qsInterval {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.qsDimGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
}

.qsCheck {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: rgba(0, 0, 0, .72);
    cursor: pointer;
}

.qsCheck input {
    width: 15px;
    height: 15px;
    flex: none;
    accent-color: var(--Secondary);
    cursor: pointer;
}

.qsMeasure {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 28px;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.qsSort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 8px;
}

.qsSubLabel {
    margin: 12px 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, .4);
}

.qsEmptyLine {
    padding: 6px 0;
    font-size: 12px;
    color: rgba(0, 0, 0, .35);
}

.qsRemove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, .1);
    background: #fff;
    color: rgba(0, 0, 0, .4);
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.qsRemove:hover {
    background: #E5348A;
    border-color: #E5348A;
    color: #fff;
}

.qsSaveBtn {
    width: 100%;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--Main);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .2s ease;
}

.qsSaveBtn:hover:not(:disabled) {
    background: var(--Secondary);
}

.qsSaveBtn:disabled {
    background: rgba(84, 55, 143, .25);
    cursor: not-allowed;
}

.qsSaved {
    display: none;
    margin-top: 16px;
}

.qsSaved.is-visible {
    display: block;
}

.qsSaved-label {
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    line-height: normal;
    color: rgba(0, 0, 0, .4);
}

.qsSaved-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    padding: 9px 12px;
    border-radius: 10px;
    background: rgba(141, 74, 242, .08);
    font-size: 12px;
    line-height: normal;
    color: var(--Black);
}

.qsSaved-item i {
    color: var(--Secondary);
}

.qsSaved-name {
    font-weight: 600;
}

.qsSaved-report {
    margin-left: auto;
    font-size: 11px;
    color: rgba(0, 0, 0, .45);
}

/*Preview renderers*/
.qsLegend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.qsLegend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: normal;
    color: rgba(0, 0, 0, .65);
}

.qsLegend-dot {
    width: 12px;
    height: 12px;
    flex: none;
    border-radius: 3px;
}

.qsLegend-name {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11.5px;
}

.qsLegend-value {
    margin-left: auto;
    font-weight: 700;
    color: var(--Main);
}

.qsSvg {
    width: 100%;
    height: auto;
    flex: 1;
}

/* Explicit height, not min-height: the bars size with percentage heights,
   which only resolve against a definite parent height. */
.qsBars {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    height: 340px;
    padding-top: 10px;
}

.qsBarGroup {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.qsBarGroup-stack {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100%;
}

.qsBar {
    flex: 1;
    display: block;
    min-height: 2px;
    border-radius: 5px 5px 0 0;
    transition: height .25s ease;
}

.qsBarGroup-label {
    margin-top: 8px;
    font-size: 10px;
    line-height: normal;
    text-align: center;
    color: rgba(0, 0, 0, .45);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qsTable {
    width: 100%;
}

.qsMetricWrap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-content: center;
    flex: 1;
}

.qsMetric {
    border-color: rgba(84, 55, 143, .16);
}

.qsDonutWrap {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    flex-wrap: wrap;
}

.qsDonut {
    position: relative;
    width: 220px;
    height: 220px;
    flex: none;
    border-radius: 50%;
}

.qsDonut-hole {
    position: absolute;
    inset: 26%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    line-height: normal;
}

.qsDonut-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--Main);
}

.qsDonut-label {
    font-size: 11px;
    color: rgba(0, 0, 0, .45);
}

.qsDonut-legend {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/*Main / System Health (System Status, NAD Status, System Logs)*/
.hsStatRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0 20px;
}

.hsStat {
    padding: 18px 22px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(84, 55, 143, .1);
    line-height: normal;
}

.hsStat-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--Black);
}

.hsStat-row {
    display: flex;
    gap: 40px;
    margin-top: 14px;
}

.hsStat-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hsStat-metric span {
    font-size: 12px;
    font-weight: 600;
}

.hsStat-metric b {
    font-size: 24px;
    font-weight: 800;
    color: var(--Black);
}

.hsStat-metric.is-critical span {
    color: #E5348A;
}

.hsStat-metric.is-high span {
    color: #C77700;
}

.hsChartGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hsChartCard,
.hsQueryCard {
    margin-top: 20px;
}

.hsQueryCard .nvQueryBar {
    margin-bottom: 0;
}

.hsHint {
    font-size: 11.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .4);
}


/*Main / NAD Settings*/
.nadRuleRow {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.nadRuleCurrent {
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: normal;
}

.nadRuleCurrent span {
    font-size: 11.5px;
    color: rgba(0, 0, 0, .45);
}

.nadRuleCurrent b {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--Black);
}

/*Main / Notification*/
.ntServerGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.ntServer-actions {
    display: flex;
    gap: 8px;
}

.ntServer-body {
    display: flex;
    gap: 40px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.ntField {
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: normal;
}

.ntField span {
    font-size: 11.5px;
    color: rgba(0, 0, 0, .45);
}

.ntField b {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    font-weight: 600;
    color: var(--Black);
}

.ntListHeader {
    margin-top: 26px;
}

.nvSectionTitle {
    font-size: 18px;
    font-weight: 800;
    color: var(--Main);
}

/*Main / Report*/
.reportPage .nvTabs {
    margin-bottom: 4px;
}

/*Main / TISG*/

/*The shared rhythm rule only reaches .appContent's direct children — the
  filter bar and the grid are both wrapped in #tisgBlockingPanel so the two
  panels can be swapped by the tabs, so they need their own gap here.*/
#tisgBlockingPanel > .dashCard + .dashCard {
    margin-top: 20px;
}

.tisgToolCard .tisgTools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tisgFilters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tisgFilters .nvMultiSelect {
    width: 190px;
}

.tisgSearch {
    width: 190px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--Black);
}

.tisgSearch:focus {
    outline: none;
    border-color: var(--Secondary);
}

/*Main / User Defined List*/
.udStatRow {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.udTools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.udTools-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.udSearch {
    width: 220px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--Black);
}

.udSearch:focus {
    outline: none;
    border-color: var(--Secondary);
}

.nvToolBtn.is-danger {
    border-color: rgba(229, 52, 138, .3);
    color: #E5348A;
}

.nvToolBtn.is-danger:hover:not(:disabled) {
    background: rgba(229, 52, 138, .1);
}

.nvToolBtn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/*Main / License*/
.licClusterRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/*Upload controls sit at the right of the card, away from the current value*/
.nadRuleUpload {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex-wrap: wrap;
}

.licClusterId {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .5);
}

/*Main / IOC Update*/
.iocActions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.iocSummary {
    display: flex;
    gap: 48px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.iocField {
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: normal;
}

.iocField span {
    font-size: 11.5px;
    color: rgba(0, 0, 0, .45);
}

.iocField b {
    font-size: 14px;
    font-weight: 600;
    color: var(--Black);
}

.nvSettingTime {
    width: 130px;
}

.iocLogTools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

/*Main / System Configuration*/
.scForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 14px;
}

.scField {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scField > label {
    font-size: 12.5px;
    color: rgba(0, 0, 0, .6);
}

.scInput {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--Black);
}

.scInput:focus {
    outline: none;
    border-color: var(--Secondary);
}

.scActions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

.scListHeader {
    margin-top: 26px;
}

/*Several CIDRs in one cell, one per line*/
.scIpList {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    line-height: normal;
}

/*Main / Threat Hunting*/
.thLead {
    margin-top: 6px;
    font-size: 13px;
    line-height: normal;
    color: rgba(0, 0, 0, .5);
}

.thForm {
    margin-top: 18px;
    margin-bottom: 20px;
}

.thForm-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.thLabel {
    display: block;
    margin-bottom: 8px;
    font-size: 12.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .6);
}

.thTextarea {
    width: 100%;
    min-height: 92px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--Black);
    resize: vertical;
}

.thTextarea:focus {
    outline: none;
    border-color: var(--Secondary);
}

.thOptions-title {
    margin-bottom: 10px;
    font-size: 12.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .6);
}

.thOptLabel {
    display: block;
    margin-bottom: 6px;
    font-size: 11.5px;
    color: rgba(0, 0, 0, .5);
    line-height: normal;
}

.thForm-options .nvDateTime {
    margin-bottom: 10px;
}

.thInput {
    width: 100%;
    margin-bottom: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, .14);
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: var(--Black);
}

.thInput:focus {
    outline: none;
    border-color: var(--Secondary);
}

/*Pre-rendered so revealing an error never reflows the form*/
.thError {
    display: none;
    margin-top: 8px;
    font-size: 11.5px;
    font-weight: 600;
    line-height: normal;
    color: #E5348A;
}

.thError.is-visible {
    display: block;
}

.thActions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.thEmpty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border-radius: 18px;
    border: 1px dashed rgba(84, 55, 143, .25);
    font-size: 13px;
    line-height: normal;
    color: rgba(0, 0, 0, .4);
}

.thCard {
    margin-top: 20px;
}

.thHint {
    font-size: 11.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .4);
}

/*Attack timeline*/
.thTimeline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.thEvent {
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid rgba(84, 55, 143, .12);
    background: rgba(141, 74, 242, .04);
    line-height: normal;
}

.thEvent-ts {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    color: rgba(0, 0, 0, .42);
}

.thEvent-name {
    margin-top: 5px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--Black);
}

.thEvent-mitre {
    margin-left: 4px;
    font-weight: 700;
    color: var(--Secondary);
}

.thEvent-flow {
    margin-top: 5px;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    color: rgba(0, 0, 0, .6);
}

/*Netflow statistics — source above destination. Stacked rather than side by
  side so each table gets the full width and stops truncating its last
  column at anything under a very wide screen.*/
.thStatsGrid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 14px;
}

.thStats-label {
    margin-bottom: 10px;
    font-size: 12px;
    line-height: normal;
    color: rgba(0, 0, 0, .45);
}

/*Event summary graph*/
.thGraphWrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
    margin-top: 14px;
}

.thGraph {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(84, 55, 143, .12);
    background: #fff;
    overflow: hidden;
}

.thGraph-legend {
    position: absolute;
    top: 14px;
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11.5px;
    line-height: normal;
    color: rgba(0, 0, 0, .55);
}

.thGraph-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.thLegendLine {
    width: 18px;
    height: 2px;
    border-radius: 2px;
}

.thLegendLine.is-nad {
    background: #E5348A;
}

.thLegendLine.is-netflow {
    background: #585CFD;
}

.thGraph-center {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}

.thGraph-svg {
    display: block;
    width: 100%;
    height: auto;
}

.thNode {
    cursor: pointer;
}

.thNode circle {
    transition: r .15s ease;
}

.thNode.is-focus circle {
    stroke: var(--Main);
    stroke-width: 3;
}

.thGraph-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 420px;
    overflow-y: auto;
}

.thGraph-ip {
    padding: 8px 12px;
    border-radius: 8px;
    background: none;
    font-family: ui-monospace, Menlo, monospace;
    font-size: 12px;
    text-align: left;
    color: rgba(0, 0, 0, .7);
    cursor: pointer;
    transition: background .15s ease;
}

.thGraph-ip:hover {
    background: rgba(141, 74, 242, .1);
}

/*Amber marks the node whose detail tables are open — deliberately not the
  purple used for filters, so "selected node" reads as a different action*/
.thGraph-ip.is-active {
    background: rgba(245, 165, 36, .18);
    font-weight: 700;
    color: #8A5A00;
}

.thNodeTag {
    margin-left: 6px;
    font-size: 12.5px;
    font-weight: 400;
    color: rgba(0, 0, 0, .45);
}

.thMitre {
    font-family: ui-monospace, Menlo, monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--Secondary);
}

/*Shown only when Quick Stats was entered from the Report Editor.
  A plain .nvToolBtn — going back is navigation, not a report component, and
  the tinted purple in this flow belongs to the component library alone.*/
.qsReturn {
    display: inline-flex;
    margin-bottom: 14px;
}

/*////06 Report Editor////*/

.reEditorHeader {
    align-items: flex-start;
}

.reBack {
    display: inline-flex;
    margin-bottom: 10px;
}

.reReportName {
    font-size: 15px;
    font-weight: 600;
    color: rgba(0, 0, 0, .45);
}

.reSubtitle {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(0, 0, 0, .5);
}

.reFrame {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-top: 20px;
}

/*----- component library -----*/

.reLib {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: none;
    width: 244px;
}

.reLib-add,
.reLib-save {
    justify-content: center;
    width: 100%;
}

.reLib-scroll {
    max-height: 56vh;
    padding: 10px;
    overflow-y: auto;
    background: var(--White);
    border: 1px solid rgba(84, 55, 143, .12);
    border-radius: 14px;
}

.reLib-group + .reLib-group {
    margin-top: 12px;
}

.reLib-cat {
    margin-bottom: 8px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-align: center;
    color: rgba(0, 0, 0, .4);
}

/*--Third, not --Main: `Add Report Item` and `Save & Exit` are already --Main,
  and three different things in one 244px column must not read as one thing.
  These are draggable content, those are actions.*/
.reLib-item {
    padding: 8px 10px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: var(--White);
    background: var(--Third);
    border-radius: 9px;
    cursor: grab;
    user-select: none;
    transition: background .16s ease, transform .16s ease;
}

.reLib-item + .reLib-item {
    margin-top: 8px;
}

.reLib-item:hover {
    background: #4247e0;
    transform: translateY(-1px);
}

/*components saved from Quick Stats — same library, different origin*/
.reLib-item.is-custom {
    color: var(--Main);
    background: #ece7f8;
}

.reLib-item.is-custom:hover {
    background: #ddd3f3;
}

/*----- pages -----*/

.rePages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    flex: 1;
    min-width: 0;
    padding-bottom: 4px;
    overflow-x: auto;
    /*this is a <section>, and master.css paints every section with --Bg —
      the paper has to sit on nothing, not on a tinted panel*/
    background: none;
}

/*A4 landscape at 96dpi is wider than the content column. `zoom` (not
  `transform`) because it takes part in layout — a scaled transform would
  leave the original 1123px of empty space behind and scroll anyway. The JS
  sets --reScale from the room actually available, and divides it back out of
  every screen measurement the drag maths takes.*/
.rePage {
    flex: none;
    width: 1123px;
    zoom: var(--reScale, 1);
    padding: 14px;
    background: var(--White);
    border: 1px solid rgba(84, 55, 143, .14);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(84, 55, 143, .07);
}

.rePage-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 300px;
    text-align: center;
}

.reCover-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--Main);
}

.reCover-sub {
    font-size: 15px;
    color: rgba(0, 0, 0, .5);
}

.reCover-date {
    font-size: 13px;
    color: rgba(0, 0, 0, .35);
}

.rePage-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.rePage-title {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 12px;
    font-family: var(--Sans);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--Black);
    background: #f7f5fc;
    border: 1px solid rgba(84, 55, 143, .14);
    border-radius: 9px;
}

.rePage-title:focus {
    outline: none;
    border-color: var(--Secondary);
}

.rePage-no {
    flex: none;
    font-size: 12px;
    color: rgba(0, 0, 0, .4);
}

.rePage-del {
    flex: none;
    width: 30px;
    height: 30px;
    font-size: 12px;
    color: rgba(0, 0, 0, .45);
    background: #f4f2f9;
    border-radius: 8px;
    cursor: pointer;
}

.rePage-del:hover {
    color: #c0392b;
    background: #fbe9e7;
}

/*----- the canvas -----*/

.reGrid {
    position: relative;
    background: #fbfaff;
    border: 1px dashed rgba(84, 55, 143, .18);
    border-radius: 10px;
    background-image:
        linear-gradient(to right, rgba(84, 55, 143, .05) 1px, transparent 1px);
    background-size: calc(100% / 12) 100%;
}

.reGrid-empty {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: rgba(0, 0, 0, .3);
    pointer-events: none;
}

.reGrid.is-empty .reGrid-empty {
    display: flex;
}

.rePlaceholder {
    position: absolute;
    background: rgba(141, 74, 242, .12);
    border: 2px dashed var(--Secondary);
    border-radius: 10px;
    pointer-events: none;
}

.reItem {
    position: absolute;
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: var(--White);
    border: 1px solid rgba(84, 55, 143, .16);
    border-radius: 10px;
    cursor: grab;
    user-select: none;
}

.reItem.is-dragging {
    opacity: .4;
}

.reItem-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex: none;
}

.reItem-name {
    overflow: hidden;
    font-size: 11.5px;
    font-weight: 600;
    color: rgba(0, 0, 0, .6);
    white-space: nowrap;
    text-overflow: ellipsis;
}

.reItem-tools {
    display: flex;
    align-items: center;
    gap: 3px;
    flex: none;
}

.reItem-w,
.reItem-x {
    width: 19px;
    height: 19px;
    font-family: var(--Sans);
    font-size: 9.5px;
    font-weight: 700;
    color: rgba(0, 0, 0, .5);
    background: #f1eef8;
    border-radius: 5px;
    cursor: pointer;
}

.reItem-w.is-on {
    color: var(--White);
    background: var(--Secondary);
}

.reItem-w:hover,
.reItem-x:hover {
    color: var(--White);
    background: var(--Main);
}

.reItem-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    margin-top: 6px;
    overflow: hidden;
}

.reItem-resize {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
    background:
        linear-gradient(135deg, transparent 55%, rgba(84, 55, 143, .35) 55%,
            rgba(84, 55, 143, .35) 70%, transparent 70%);
}

/*while a drag is live nothing under the pointer should react to it*/
body.is-reDragging {
    cursor: grabbing;
}

body.is-reDragging .reItem,
body.is-reDragging .reLib-item {
    pointer-events: none;
}

.reGhost {
    position: fixed;
    z-index: 130;
    max-width: 220px;
    padding: 7px 11px;
    font-size: 12px;
    font-weight: 600;
    color: var(--White);
    /*the ghost is the library item in flight, so it keeps the item's colour*/
    background: var(--Third);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(84, 55, 143, .3);
    pointer-events: none;
}

/*----- widget previews -----*/

.reViz {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.reViz-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.reViz-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--Main);
}

.reViz-delta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    line-height: 1.3;
    color: #2e7d32;
}

.reViz-table {
    overflow: hidden;
}

.reViz-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
    line-height: 1.9;
}

.reViz-table th {
    font-weight: 700;
    text-align: left;
    color: rgba(0, 0, 0, .45);
    border-bottom: 1px solid rgba(84, 55, 143, .12);
}

.reViz-table td {
    color: rgba(0, 0, 0, .65);
    border-bottom: 1px solid rgba(84, 55, 143, .06);
}

.reViz-table td:last-child,
.reViz-table th:last-child {
    text-align: right;
}

.reViz-bar .nvBarRow {
    padding: 2px 0;
}

.reViz-bar .nvBarRow-label,
.reViz-bar .nvBarRow-value {
    font-size: 10.5px;
}

.reViz-line .nvChart-svg,
.reViz-line svg {
    width: 100%;
    height: 100%;
}

.reAddPage {
    flex: none;
}

/*////RWD////*/
@media screen and (max-width:1660px) {}

@media screen and (max-width:1440px) {}

@media screen and (max-width:1366px) {}

@media screen and (max-width:1280px) {

    /*Dashboard/Alert Center grids drop to two columns*/
    .dashGrid > .col-span-4,
    .dashGrid > .col-span-6 {
        grid-column: span 6;
    }

    /*Quick Stats editor stops squeezing the preview*/
    .qsLayout {
        grid-template-columns: minmax(0, 1fr) 340px;
    }
}

@media screen and (max-width:1024px) {

    /*Report Editor: the library beside a 1123px page leaves the canvas a
      sliver, so it moves above it and the paper takes the full width*/
    .reFrame {
        flex-direction: column;
    }

    .reLib {
        position: static;
        width: 100%;
    }

    .reLib-scroll {
        max-height: 240px;
    }

    .rePages {
        width: 100%;
    }

    /*System shell: full-bleed, off-canvas sidebar driven by #sidebarToggle*/
    main.appShell {
        width: 100vw;
        height: 100vh;
        position: relative;
    }

    /*Capped at 82vw so there is always a strip of backdrop left to tap
      for dismissal, even on a 360px phone*/
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 60;
        width: min(260px, 82vw);
        transform: translateX(-100%);
        transition: transform .3s ease;
        background: var(--G02);
    }

    /*Reuse the existing toggle: collapsed now means "slid in"*/
    .sidebar.is-collapsed {
        width: min(260px, 82vw);
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    }

    .sidebar.is-collapsed .sidebar-brand,
    .sidebar.is-collapsed .navLabel,
    .sidebar.is-collapsed .navChevron {
        display: initial;
    }

    .sidebar.is-collapsed .navSubmenu {
        display: block;
    }

    .sidebar.is-collapsed .navLink,
    .sidebar.is-collapsed .navGroupToggle {
        justify-content: flex-start;
        padding: 10px 12px;
    }

    /*The in-page toggle rides off-screen with the drawer, so use the
      injected one in the topbar instead*/
    .sidebarOpen {
        display: flex;
    }

    .sidebarBackdrop.is-open {
        display: block;
    }

    .appContent {
        padding: 16px;
    }

    .dashTopbar {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .dashGrid > .col-span-4,
    .dashGrid > .col-span-6,
    .dashGrid > .col-span-12 {
        grid-column: span 12;
    }

    /*Quick Stats stacks: preview first, then the editor*/
    .qsLayout {
        grid-template-columns: minmax(0, 1fr);
    }

    .qsPreview-box {
        min-height: 320px;
    }

    .nvPageHeader {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    /*System Configuration form goes single column*/
    .scForm {
        grid-template-columns: minmax(0, 1fr);
    }

    /*User Defined List stat cards stack*/
    .udStatRow {
        grid-template-columns: minmax(0, 1fr);
    }

    /*Notification server cards stack*/
    .ntServerGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    /*System Health: stat cards and charts go single column*/
    .hsStatRow,
    .hsChartGrid {
        grid-template-columns: minmax(0, 1fr);
    }

    /*Threat Hunting stacks: query, then options, then results.
      .thStatsGrid is already a stacked flex column at every width.*/
    .thForm-grid,
    .thGraphWrap {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .thGraph-list {
        flex-direction: row;
        flex-wrap: wrap;
        max-height: none;
    }
}

@media screen and (max-width:1024px) {
    .login {
        flex-direction: column;
        justify-content: center;
        overflow-y: auto;
        gap: 24px;
        padding: 24px;
    }

    .loginLeft {
        width: 100%;
        padding: 24px;
    }

    .loginLeft-logo {
        display: block;
        margin: 0 auto;
    }


    .loginLeft h1 {
        width: 100%;
        font-size: 2.25rem;
        text-align: center;
    }

    .loginLeft-content {
        width: 100%;
    }

    .loginLeft-content p {
        display: none;
    }

    .loginRight {
        width: 100%;
        padding: 24px;
    }

    .errorPage {
        padding: 24px;
    }

    .errorCard {
        padding: 32px 24px;
    }
}

@media (orientation:landscape) and (max-height:767px) {}

@media (orientation:portrait) and (max-height:1180px) {}

@media (orientation:portrait) and (max-height:1024px) {}

@media screen and (max-width:480px) {
    .loginLeft h1 {
        font-size: 1.75rem;
    }

    .errorCard {
        padding: 28px 20px;
    }

    .errorCard .text-7xl {
        font-size: 3.5rem;
    }
}

/*Iphone XR 414*896 */
@media (orientation: portrait) and (max-height:896px) {}

/*Iphone 12Pro 390*844 */
@media (orientation: portrait) and (max-height:844px) {}

@media (orientation: portrait) and (max-width:390px) {}

/*Iphone 10 375*812 */
@media (orientation: portrait) and (max-height:812px) {}

@media (orientation: portrait) and (max-width:375px) {}

/*Iphone 8Plus 414*736 */
@media (orientation: portrait) and (max-height:736px) {}

/*Iphone 8 375*667 */
@media (orientation: portrait) and (max-height:667px) {}

@media screen and (max-width:360px) {}

@media screen and (max-width:320px) {}