* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航 */
.sidebar {
    width: 250px;
    background: #1e90ff; /* 天空蓝主体 */
    color: #ffffff;      /* 白字 */
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background: #187bcd; /* 天空蓝加深 */
    color: #ffffff;
    text-align: center;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: #ffffff; /* 白字 */
    text-decoration: none;
    transition: background .15s ease;
}

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

.nav-link.active {
    background: rgba(255,255,255,0.16);
}

.nav-link i { display: none; }

/* 主内容区 */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 20px;
}

.content-header {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.content-header h1 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.breadcrumb {
    color: #7f8c8d;
    font-size: 14px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    background: #f8f9fa;
}

.card-body {
    padding: 20px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
    margin-right: 5px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

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

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-col {
    flex: 1;
}

/* 图片预览 */
.image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.image-item {
    position: relative;
    display: inline-block;
}

.image-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.image-delete {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
}

.pagination a:hover {
    background: #f5f5f5;
}

.pagination .current {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 600px;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* 拖拽排序 */
.sortable {
    cursor: move;
}

.sortable:hover {
    background: #f8f9fa;
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 12px;
    color: white;
}

.badge-success {
    background: #27ae60;
}

.badge-warning {
    background: #f39c12;
}

.badge-danger {
    background: #e74c3c;
}

/* 主要徽章（用于数量等） */
.badge-primary {
    background: #3498db;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 侧边栏手风琴导航 */
.sidebar-nav {
    padding: 0 10px;
}

.accordion-section {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.accordion-header {
    width: 100%;
    background: transparent; /* 与侧栏统一 */
    border: none;
    outline: none;
    cursor: pointer;
    padding: 12px 12px;
    color: #ffffff; /* 白字 */
    font-weight: 600;
    display: block;
}

.accordion-header i { display: none; }

.accordion-header::after { content: none; }

.accordion-section.open .accordion-header::after { content: none; }

.accordion-body {
    display: none;
    padding: 0 0 8px 0;
}

.accordion-section.open .accordion-body {
    display: block;
}

.accordion-body .nav-item {
    margin: 6px 0;
}

.accordion-body .nav-link {
    display: block;
    padding: 10px 20px; /* 简洁无过度缩进 */
    color: #ffffff;
    border-radius: 0;
}

.accordion-body .nav-link:hover {
    background: rgba(255,255,255,0.08);
}

.accordion-body .nav-link.active {
    background: rgba(255,255,255,0.16);
}