/* Bundled layout & navigation styles from MainLayout.razor.css & NavMenu.razor.css */
.page {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    position: relative;
}

main {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.sidebar {
    background: linear-gradient(180deg, #0f1526 0%, #101a30 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.top-row {
    backdrop-filter: blur(12px);
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--ct-admin-line);
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row a, .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
    text-decoration: none;
}

.top-row a:hover, .top-row .btn-link:hover {
    text-decoration: underline;
}

.top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user {
    align-items: center;
    display: inline-flex;
    gap: 0.5rem;
    min-width: 0;
}

.topbar-avatar {
    align-items: center;
    background: #eef2ff;
    border-radius: 999px;
    color: var(--ct-admin-primary);
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 600;
    height: 1.7rem;
    justify-content: center;
    width: 1.7rem;
}

.topbar-user-name {
    color: var(--ct-admin-text);
    font-size: 0.875rem;
    font-weight: 500;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 640.98px) {
    .top-row {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
        height: 100dvh;
    }

    .sidebar {
        flex: 0 0 250px;
        height: 100dvh;
        position: sticky;
        top: 0;
        width: 250px;
    }

    .top-row {
        flex-shrink: 0;
        position: relative;
        top: 0;
        z-index: 1;
    }

    .top-row.auth a:first-child {
        flex: 1;
        text-align: right;
        width: 0;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked {
    background-color: rgba(255, 255, 255, 0.5);
}

.nav-brand {
    display: flex;
    align-items: center;
    min-height: 3.5rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 600;
    gap: 0.6rem;
    letter-spacing: -0.01em;
    padding: 0;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #fff;
}

.nav-brand-mark {
    align-items: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #a8c3ff;
    display: inline-flex;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.nav-group-label {
    color: rgba(255, 255, 255, 0.38);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 1.1rem 1.15rem 0.35rem;
    text-transform: uppercase;
}

.nav-group-label:first-child {
    padding-top: 0.85rem;
}

.nav-item {
    padding-bottom: 0.2rem;
}

.nav-item .nav-link {
    align-items: center;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.72);
    display: flex;
    font-size: 0.875rem;
    font-weight: 450;
    gap: 0.65rem;
    height: 2.35rem;
    line-height: 1;
    padding: 0 0.75rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    width: 100%;
    text-decoration: none;
}

.nav-icon {
    color: rgba(255, 255, 255, 0.55);
    flex: 0 0 auto;
    transition: color 0.15s ease;
}

.nav-item .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-item .nav-link:hover .nav-icon {
    color: rgba(255, 255, 255, 0.85);
}

.nav-item a.active {
    background-color: rgba(255, 255, 255, 0.13);
    color: #fff;
}

.nav-item a.active .nav-icon {
    color: #a8c3ff;
}

.nav-scrollable {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
