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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
}

#app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 180px;
    background: linear-gradient(180deg, #1890ff 0%, #096dd9 100%);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar .logo {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #1890ff 0%, #096dd9 100%);
    z-index: 10;
}

.sidebar .logo h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 2px;
}

.nav-menu {
    flex: 1;
    padding: 8px 0;
}

/* 分类菜单样式 */
.nav-category {
    margin-bottom: 2px;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.category-header:hover { background: rgba(255,255,255,0.1); }
.category-header.active { background: rgba(255,255,255,0.15); border-left-color: white; }

.category-left { display: flex; align-items: center; }
.category-icon { font-size: 18px; margin-right: 10px; width: 20px; text-align: center; }
.category-arrow { font-size: 12px; color: rgba(255,255,255,0.8); transition: transform 0.25s; margin-left: 8px; }
.category-arrow.expanded { transform: rotate(90deg); }

/* 子菜单样式 */
.category-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.category-children.expanded {
    max-height: 400px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px 10px 44px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 13px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.9);
    color: white;
}

.nav-icon {
    font-size: 16px;
    margin-right: 10px;
    width: 18px;
    text-align: center;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: 180px;
    padding: 20px 24px;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f1f1f;
}

.subtitle {
    color: #8c8c8c;
    font-size: 14px;
    margin-bottom: 24px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #1890ff;
    color: white;
}

.btn-primary:hover {
    background: #40a9ff;
}

.btn-success {
    background: #52c41a;
    color: white;
}

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

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

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

.table th {
    font-weight: 500;
    color: #666;
    background: #fafafa;
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #1890ff;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

/* 搜索栏样式 */
.search-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.tag-success {
    background: #f6ffed;
    color: #52c41a;
}

.tag-warning {
    background: #fff7e6;
    color: #fa8c16;
}

.tag-error {
    background: #fff1f0;
    color: #ff4d4f;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

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

.pagination button {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.pagination button.active {
    background: #1890ff;
    color: white;
    border-color: #1890ff;
}

/* 模态框样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
}

.modal.show,
.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 500px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

/* Toast提示 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.toast.show {
    opacity: 1;
}

.toast-success {
    background: #52c41a;
}

.toast-error {
    background: #ff4d4f;
}

/* 响应式 */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar .logo h2 {
        font-size: 12px;
    }
    
    .category-header span:not(.category-icon),
    .nav-item span:not(.nav-icon) {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
}