/* 管理后台样式 */

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.1);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
}

.sidebar .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link:hover {
    color: #fff;
}

/* 主内容区样式 */
main {
    padding-top: 20px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 1rem;
}

/* 卡片样式 */
.card {
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn {
    margin-right: 0.5rem;
}

/* 表格样式 */
table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        position: relative;
        height: auto;
        box-shadow: none;
    }
    
    .sidebar-sticky {
        height: auto;
    }
}

/* 登录页面样式 */
body {
    background-color: #f8f9fa;
}

/* 上传图片预览 */
.image-preview {
    max-width: 100px;
    max-height: 100px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 分类树样式 */
.category-tree {
    list-style: none;
    padding-left: 20px;
}

.category-tree li {
    margin-bottom: 5px;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 消息提示 */
.alert {
    margin-top: 10px;
    margin-bottom: 10px;
}