* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    background: #f5f5f5;
}

/* 布局 */
.wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    background: #2c3e50;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h2 {
    font-size: 20px;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    margin-top: 20px;
}

.sidebar-menu li {
    border-bottom: 1px solid #34495e;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background 0.3s;
}

.sidebar-menu li a:hover {
    background: #34495e;
}

.sidebar-menu li.active a {
    background: #3498db;
}

/* 主内容区 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 顶部导航 */
.topbar {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.topbar-left h1 {
    font-size: 24px;
    margin: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-right span {
    margin-right: 20px;
}

/* 内容区 */
.content {
    padding: 30px;
    flex: 1;
}

/* 面板 */
.panel {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.panel-heading {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.panel-heading h3 {
    font-size: 16px;
    margin: 0;
}

.panel-body {
    padding: 20px;
}

.panel-footer {
    padding: 15px 20px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

/* 数据卡片 */
.stats-cards {
    margin-bottom: 30px;
}

.card {
    padding: 20px;
    border-radius: 4px;
    color: #fff;
}

.card h3 {
    font-size: 14px;
    margin-bottom: 10px;
}

.card .number {
    font-size: 32px;
    font-weight: bold;
    margin: 0;
}

.card-blue { background: #3498db; }
.card-green { background: #27ae60; }
.card-orange { background: #e67e22; }
.card-purple { background: #9b59b6; }

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f9f9f9;
    font-weight: 600;
}

.table-striped tbody tr:nth-child(odd) {
    background: #f9f9f9;
}

/* 按钮 */
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }

.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #229954; }

.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }

.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #e67e22; }

.btn-info { background: #16a085; color: #fff; }
.btn-info:hover { background: #138d75; }

.btn-default { background: #95a5a6; color: #fff; }
.btn-default:hover { background: #7f8c8d; }

.btn-sm { padding: 4px 8px; font-size: 12px; }
.btn-xs { padding: 2px 6px; font-size: 11px; }

.btn-block { display: block; width: 100%; }

/* 表单 */
.form-group {
    margin-bottom: 15px;
}

.form-horizontal .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.form-control {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

.control-label {
    min-width: 100px;
    margin-right: 15px;
}

.help-block {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* 登录页 */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 标签 */
.label {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 3px;
    color: #fff;
}

.label-success { background: #27ae60; }
.label-warning { background: #f39c12; }
.label-danger { background: #e74c3c; }
.label-info { background: #3498db; }
.label-primary { background: #8e44ad; }
.label-default { background: #95a5a6; }

/* 表单操作按钮 */
.form-actions {
    margin-top: 20px;
}

/* 分页 */
.pagination {
    display: flex;
    gap: 5px;
}

.pagination a,
.pagination span {
    padding: 6px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.pagination .current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
}

/* 响应式 */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .topbar {
        flex-direction: column;
        gap: 15px;
    }

    .topbar-right {
        flex-direction: column;
        width: 100%;
    }

    .form-horizontal .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .control-label {
        margin-bottom: 10px;
    }
}
