* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
}
/* 登录页 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
}
.login-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #165DFF;
}
/* 布局 */
.layout {
    display: flex;
    min-height: 100vh;
}
#sidebar-container {
    display: flex;
}
.sidebar {
    width: 220px;
    background: #001529;
    color: white;
    flex-shrink: 0;
}
.sidebar-logo {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar-menu {
    padding: 12px 0;
}
.menu-item {
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.75);
}
.menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}
.menu-item.active {
    background: #165DFF;
    color: white;
}
/* ===== 多级菜单 ===== */
.menu-group {
    margin-bottom: 1px;
}
.menu-group-title {
    padding: 14px 24px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.75);
    user-select: none;
}
.menu-group-title:hover {
    background: rgba(255,255,255,0.08);
    color: white;
}
.menu-group-icon {
    flex-shrink: 0;
}
.menu-group-label {
    flex: 1;
}
.menu-group-arrow {
    font-size: 9px;
    transition: transform 0.2s;
    color: rgba(255,255,255,0.45);
    flex-shrink: 0;
}
.menu-group-arrow.open {
    transform: rotate(90deg);
}
.submenu {
    background: rgba(0,0,0,0.25);
}
.submenu-item {
    padding: 12px 24px 12px 50px !important;
    font-size: 14px;
}
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.header {
    height: 60px;
    background: white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}
.content {
    padding: 20px;
    flex: 1;
}
/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}
/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.stat-card .label {
    color: #999;
    font-size: 14px;
    margin-bottom: 8px;
}
.stat-card .value {
    font-size: 28px;
    font-weight: bold;
    color: #165DFF;
}
/* 表单 */
.form-group {
    margin-bottom: 16px;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
}
.form-input, .form-select, textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}
.form-input:focus, .form-select:focus, textarea:focus {
    border-color: #165DFF;
}
textarea {
    min-height: 120px;
    resize: vertical;
}
/* 按钮 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.btn-primary {
    background: #165DFF;
    color: white;
}
.btn-primary:hover {
    background: #4080FF;
}
.btn-danger {
    background: #f53f3f;
    color: white;
}
.btn-danger:hover {
    background: #f76560;
}
.btn-default {
    background: white;
    border: 1px solid #d9d9d9;
    color: #333;
}
.btn-default:hover {
    border-color: #165DFF;
    color: #165DFF;
}
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}
/* 表格 */
.table-wrap {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
th {
    background: #fafafa;
    font-weight: 600;
}
tr:hover {
    background: #fafafa;
}
/* 标签 */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}
.tag-success { background: #e8ffea; color: #00b42a; }
.tag-warning { background: #fff7e8; color: #ff7d00; }
.tag-danger { background: #ffece8; color: #f53f3f; }
.tag-default { background: #f2f3f5; color: #86909c; }
.tag-primary { background: #e8f3ff; color: #165DFF; }
/* 筛选栏 */
.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar .form-input, .filter-bar .form-select {
    width: 200px;
}
/* 分页 */
.pagination {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    justify-content: flex-end;
    align-items: center;
}
.pagination .page-btn {
    padding: 6px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    cursor: pointer;
    background: white;
}
.pagination .page-btn.active {
    background: #165DFF;
    color: white;
    border-color: #165DFF;
}
/* 图表 */
.chart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.chart-box {
    height: 350px;
}
/* 商品图片 */
.goods-thumb {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}
/* 订单详情 */
.order-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.order-info .item {
    display: flex;
    gap: 8px;
}
.order-info .label {
    color: #999;
    min-width: 80px;
}
