/* sidebar.css */
#sidebar {
    width: 20%;
    min-width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
}

.sidebar-gradient {
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    color: white;
}

.menu-item {
    transition: all 0.3s ease;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.menu-item.active {
    background: rgba(220, 38, 38, 0.2);
    border-right: 3px solid #dc2626;
}

/* Logo区域样式 */
#system-logo {
    transition: transform 0.3s ease;
}

#system-logo:hover {
    transform: scale(1.05);
}

/* 用户头像样式 */
#user-avatar {
    transition: transform 0.3s ease;
}

#user-avatar:hover {
    transform: scale(1.1);
}

/* 菜单图标样式 */
.menu-item i {
    transition: transform 0.3s ease;
}

.menu-item:hover i {
    transform: scale(1.1);
}

/* 底部按钮样式 */
.p-4.border-t button {
    transition: all 0.3s ease;
}

/* 基础布局样式 */
.p-6 {
    padding: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-2 {
    padding: 0.5rem;
}

.border-b {
    border-bottom: 1px solid;
}

.border-t {
    border-top: 1px solid;
}

.border-gray-600 {
    border-color: #4b5563;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.cursor-pointer {
    cursor: pointer;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 50%;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.justify-center {
    justify-content: center;
}

.flex-1 {
    flex: 1;
    margin-left: 0.5rem; /* 图标和文字间距增加2px */
}

/* 菜单项垂直居中和间距调整 */
.menu-item {
    align-items: center; /* 垂直居中 */
    margin-bottom: 0.25rem; /* 减少50%间距，从0.5rem改为0.25rem */
}

.space-y-2 > * + * {
    margin-top: 0.25rem; /* 减少50%间距 */
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.text-lg {
    font-size: 1.125rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* 菜单项字体大小调整 */
.menu-item {
    font-size: 1.1rem; /* 菜单项字体统一为1.1rem */
}

.menu-group-header {
    font-size: 1.1rem; /* 菜单目录项字体统一为1.1rem */
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.text-white {
    color: white;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-red-400 {
    color: #f87171;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.transition-all {
    transition: all 0.3s ease;
}

.transition-colors {
    transition: color 0.3s ease;
}

.duration-200 {
    transition-duration: 200ms;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

a:hover {
    text-decoration: none;
}

/* 菜单组样式 */
.menu-group {
    margin-bottom: 0.25rem;
}

.menu-group-header {
    user-select: none;
}

.menu-group-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

.rotate-180 {
    transform: rotate(180deg);
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.ml-4 {
    margin-left: 1rem;
}

button {
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.p-4.border-t button:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    transform: translateX(2px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-gradient {
        width: 100%;
        position: fixed;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar-gradient.mobile-open {
        transform: translateX(0);
    }
}

/* 滚动条样式 */
.sidebar-gradient::-webkit-scrollbar {
    width: 6px;
}

.sidebar-gradient::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-gradient::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-gradient::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}