.apmarker-container {
  display: flex; /* 启用 Flex 布局 */
  width: 100%; /* 确保容器宽度足够 */
}

.public-sidebar-container {
  flex: 0 0 auto; /* 不伸缩，不收缩，自动宽度 */
}


.mobile-menu-toggle svg {
    fill: #fff;
}

.public-sidebar-container {
    width: 160px;
    background: var(--apmarker-dark-color);
    border-radius: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    color: #374151;
    font-family: var(--apmarker-font-family);
    height: 100vh;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 0;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.ap-user-profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px;
    border-radius: var(--apmarker-normal-border-radius);
    transition: all 0.3s ease;
    cursor: pointer;

}
.ap-user-profile:hover {
    border: 1px solid #f1f1f1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ap-user-avatar {
    flex: 1;
    max-width: 80%;
    width: 90px;
    height: auto;
    margin-bottom: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ap-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ap-user-name {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    max-width: 125px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: capitalize;
}
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.sidebar-menu-item {
    margin-bottom: 10px;
    padding: 0 10px;
    transition: all 0.3s ease;
    position: relative;

}
.sidebar-menu-item:hover {
    transform: translateX(5px);
}

.public-sidebar-container span.apmarker-icon.arrow-right-m {
    position: absolute;
    right: 10px;
    top: 0;
    width: 22px;
    height: 22px;
    padding: 8px;
    box-sizing: content-box;
    background-size: 60%;
    background-position: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.public-sidebar-container span.apmarker-icon.arrow-right-m.active {
  transform: rotate(90deg);
}

.sidebar-collapse {
    display: none;
}
.sidebar-collapse.show {
    display: block;
}

.sidebar-link,
.nolink-sidebar-link {
    position: relative;
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: #d1d1d1;
    text-decoration: none;
    border-radius: var(--apmarker-normal-border-radius);
    transition: all 0.3s ease;
}

.sidebar-menu-item.current-page a::before,
.sidebar-menu-item:hover a::before{
    position: absolute;
    top: 10px;
    left: 0;
    height: 1.2rem;
    width: .25rem;
    border-radius: 3px;
    content: "";
    opacity: 1;
    background-color: #fff;
}

.second-sidebar-link::before,
.sidebar-menu-item:hover .second-sidebar-link::before{
    content: none !important;
}

.sidebar-menu-item:hover .sidebar-link, .sidebar-menu-item.current-page .sidebar-link,.sidebar-menu-item:hover .nolink-sidebar-link, .sidebar-menu-item.current-page .nolink-sidebar-link {
    color: #fff;
    background-color: rgb(255 255 255 / 40%);

}

.sidebar-icon {
    margin-right: 12px;
    font-size: 1.2rem;
    line-height: 1.2rem;
}
.sidebar-text {
    font-size: 1rem;
    font-weight: 500;
}

ul.sidebar-nav-second-level a {
    padding: 8px 15px;
    color: var(--apmarker-dark-link-color);
    font-size: 16px;
    display: block;
    position: relative;
}

ul.sidebar-nav-second-level {
    padding-left: 33px;
}

ul.sidebar-nav-second-level li {
    display: block;
}

ul.sidebar-nav-second-level a:hover {
    color: #fff;
}


@media(min-width:1240px){
  .public-sidebar-container{
    width: 200px;
  }
}
button.sidebar-close-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    opacity: 1;
    text-align: center;
    width: 30px;
    height: 30px;
    line-height: 30px;
    float: right;
    padding: 0 !important;
    transition: .3s;
}
button.sidebar-close-btn:hover {
    background: #e5efff;
    border-radius: 50%;
}
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
}
/*for mobile menu*/
@media(min-width:769px){
.mobile-menu-toggle, .sidebar-overlay{
    display: none;
}
}
nav.sidebar-nav.active {
    display: block;
}
nav.sidebar-nav.active li {
    width: 100%;
}

@media(max-width:768px){
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
nav.sidebar-nav {
    transform: translateX(-110%);
    max-width: 200px;
    height: 100vh;
    width: 100%;
    background: var(--apmarker-dark-color);
    box-shadow: 1px 1px 5px #00000036;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 999;
    transition: .3s;
}
}
@media (max-width: 768px) {
  .apmarker-container {
    flex-direction: column; /* Flexbox 垂直排列 */
    /* 或 Grid 改为单列 */
    grid-template-columns: 1fr;
  }
  .public-sidebar-container {
    width: 100%; /* 侧边栏占满宽度 */
    height:auto;
  }
  li.sidebar-menu-item {
    display: inline-block;
    margin-bottom: 0;
  }
  .sidebar-header {
    margin-bottom: 0;
  }
  button.sidebar-close-btn {
      display: inline-block;
  }
}

/*頁面轉化動畫*/
.ap-loading {
    background: rgba(6, 7, 7, 0.175);
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 99999;
}

div#content-loading {
    height: 100vh;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

svg.content-loading-svg {
    max-width: 100px;
}

.content-loading-text {
    color: #6c757d;
    display: block;
    padding: 5px 20px;
    border-radius: var(--apmarker-normal-border-radius);
}
ul.bottom-menu {
    width: 100%;
    position: absolute;
    bottom: 0;
    left: 0;
}
@media(min-width:769px){
    nav.sidebar-nav {
        height: calc(100% - 70.7px);
        position: relative;
    }
    

}
