#wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

:root {
    --hive-primary: #01417e;
    --hive-primary-hover: #013b74;
    --hive-primary-active: #012f5c;
    --hive-primary-rgb: 1, 65, 126;
    --hive-primary-subtle: #d7e7f5;
    --bs-primary: var(--hive-primary);
    --bs-primary-rgb: var(--hive-primary-rgb);
    --bs-primary-text-emphasis: #012f5c;
    --bs-primary-bg-subtle: var(--hive-primary-subtle);
    --bs-primary-border-subtle: #8bb4d9;
    --bs-link-color: var(--hive-primary);
    --bs-link-color-rgb: var(--hive-primary-rgb);
    --bs-link-hover-color: var(--hive-primary-hover);
    --bs-link-hover-color-rgb: 1, 59, 116;
    --bs-focus-ring-color: rgba(var(--hive-primary-rgb), 0.25);
}

.bg-primary {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--hive-primary-rgb), var(--bs-bg-opacity)) !important;
}

.text-primary {
    --bs-text-opacity: 1;
    color: rgba(var(--hive-primary-rgb), var(--bs-text-opacity)) !important;
}

.border-primary {
    --bs-border-opacity: 1;
    border-color: rgba(var(--hive-primary-rgb), var(--bs-border-opacity)) !important;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--hive-primary);
    --bs-btn-border-color: var(--hive-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hive-primary-hover);
    --bs-btn-hover-border-color: var(--hive-primary-hover);
    --bs-btn-focus-shadow-rgb: var(--hive-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hive-primary-active);
    --bs-btn-active-border-color: var(--hive-primary-active);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--hive-primary);
    --bs-btn-disabled-border-color: var(--hive-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--hive-primary);
    --bs-btn-border-color: var(--hive-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--hive-primary);
    --bs-btn-hover-border-color: var(--hive-primary);
    --bs-btn-focus-shadow-rgb: var(--hive-primary-rgb);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--hive-primary-active);
    --bs-btn-active-border-color: var(--hive-primary-active);
    --bs-btn-disabled-color: var(--hive-primary);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: var(--hive-primary);
}

.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--hive-primary);
    border-color: var(--hive-primary);
}

.form-check-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: #5f9bcf;
    box-shadow: 0 0 0 0.25rem rgba(var(--hive-primary-rgb), 0.22);
}

#sidebar-wrapper {
    width: 250px;
    min-height: 100vh;
    transition: all 0.3s;
}

#page-content-wrapper {
    flex: 1;
    padding: 20px;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: -250px;
}

.topbar-platform-brand {
    align-items: center;
    display: inline-flex;
    gap: 0.65rem;
    min-width: 0;
}

.topbar-platform-brand img {
    border-radius: 0.4rem;
    flex: 0 0 auto;
    object-fit: contain;
}

.topbar-platform-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
    min-width: 0;
}

.topbar-platform-brand__name {
    font-size: 1rem;
    font-weight: 750;
    letter-spacing: 0;
}

.topbar-platform-brand__tagline {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 500;
    margin-top: 0.15rem;
    white-space: nowrap;
}

/* Sidebar - improve readability/touch */
#sidebar-wrapper .list-group-item {
    border: 0;
}

.sidebar-platform-logo {
    border-radius: 0.75rem;
    height: auto;
    max-width: 104px;
    width: 44%;
}

.sidebar-platform-name {
    font-size: 1.35rem;
    font-weight: 750;
    letter-spacing: 0;
}

.sidebar-platform-tagline {
    color: #d1d5db;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.25;
    margin: 0.2rem auto 0.35rem;
    max-width: 12rem;
}

#sidebar-wrapper .list-group-item.active {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
}

#sidebar-wrapper .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-version-row {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    justify-content: center;
}

.sidebar-version-info {
    align-items: center;
    color: #9ca3af;
    display: inline-flex;
    font-size: 0.88rem;
    height: 1.35rem;
    justify-content: center;
    line-height: 1;
    text-decoration: none;
    width: 1.35rem;
}

.sidebar-version-info:hover,
.sidebar-version-info:focus-visible {
    color: #fff;
    text-decoration: none;
}

.sidebar-release-menu {
    max-height: min(70vh, 520px);
    min-width: 18rem;
    overflow-y: auto;
    width: min(22rem, calc(100vw - 2rem));
}

.sidebar-release-list {
    display: grid;
    gap: 0.65rem;
}

.sidebar-release-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 0.55rem;
}

.sidebar-release-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.sidebar-release-title {
    color: #f9fafb;
    font-size: 0.86rem;
    font-weight: 650;
    line-height: 1.25;
}

.sidebar-release-app {
    color: #9ca3af;
    font-size: 0.74rem;
    margin-top: 0.15rem;
}

.text-pre-wrap {
    white-space: pre-wrap;
}

.topbar-user-nav {
    gap: 0.55rem;
}

.topbar-user-name,
.topbar-user-action {
    display: flex;
    align-items: center;
}

.topbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    line-height: 1;
}

.topbar-user-chip .bi {
    font-size: 1rem;
    opacity: 0.9;
}

.topbar-action-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: 0.45rem 0.9rem !important;
    border-radius: 999px;
    color: #fff !important;
    text-decoration: none !important;
    line-height: 1;
}

.topbar-action-link:hover,
.topbar-action-link:focus-visible {
    background: rgba(255, 255, 255, 0.14);
}

.live-update-banner {
    border-bottom: 1px solid #f59e0b;
    color: #1f2937;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.live-update-banner--warning {
    background: #fff7ed;
}

.live-update-banner--paused {
    background: #fee2e2;
    border-bottom-color: #dc2626;
}

.live-update-banner__content {
    align-items: center;
    display: flex;
    gap: 0.65rem;
}

.live-update-banner .bi {
    flex: 0 0 auto;
    font-size: 1.1rem;
}

.public-platform-brand {
    align-items: center;
    color: #111827;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 0 auto 2rem;
    text-align: left;
}

.public-platform-brand img {
    border-radius: 1rem;
    height: auto;
    object-fit: contain;
    width: 96px;
}

.public-platform-brand__name {
    color: var(--hive-primary);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
}

.public-platform-brand__tagline {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.3rem;
}

@media (max-width: 991.98px) {
    .topbar-platform-brand__tagline {
        display: none;
    }

    .topbar-user-nav {
        align-items: stretch !important;
        gap: 0.35rem;
        margin-top: 0.75rem;
    }

    .topbar-user-chip,
    .topbar-action-link {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px) {
    .public-platform-brand {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .public-platform-brand img {
        width: 84px;
    }
}
