/* ========== 全局样式 ========== */
body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f2f2f2;
    margin: 0;
    padding: 0;
}

/* ========== 滚动条样式 ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ========== 卡片样式 ========== */
.layui-card {
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 15px;
}
.layui-card-header {
    font-weight: bold;
    background-color: #fafafa;
    border-bottom: 1px solid #eee;
}

/* ========== 按钮样式 ========== */
.layui-btn-primary {
    border-color: #1E9FFF;
    color: #1E9FFF;
}
.layui-btn-primary:hover {
    background-color: #1E9FFF;
    color: #fff;
}

/* ========== 表格样式 ========== */
.layui-table th {
    font-weight: bold;
    background-color: #fafafa;
}
.layui-table td {
    padding: 12px 8px;
}

/* ========== 表单样式 ========== */
.layui-form-label {
    font-weight: normal;
    color: #666;
}
.layui-input:focus,
.layui-textarea:focus {
    border-color: #1E9FFF !important;
}

/* ========== 标签样式 ========== */
.layui-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-right: 5px;
}
.layui-tag-blue {
    color: #1890ff;
    background: #e6f7ff;
}
.layui-tag-green {
    color: #52c41a;
    background: #f6ffed;
}
.layui-tag-orange {
    color: #faad14;
    background: #fffbe6;
}
.layui-tag-red {
    color: #f5222d;
    background: #fff1f0;
}

/* ========== 状态样式 ========== */
.status-enabled {
    color: #52c41a;
    background: #f6ffed;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.status-disabled {
    color: #f5222d;
    background: #fff1f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.status-pending {
    color: #faad14;
    background: #fffbe6;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ========== 登录页 ========== */
.login-container {
    width: 400px;
    margin: 150px auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}
.login-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 24px;
    font-weight: bold;
}
.login-title img {
    height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}
.captcha-img {
    cursor: pointer;
    height: 38px;
    border-radius: 4px;
    width: 100%;
}

/* ========== 主框架 ========== */
.site-demo-logo {
    height: 60px;
    line-height: 60px;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}
.site-demo-logo img {
    height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}
.user-info {
    float: right;
    margin-right: 20px;
    color: #fff;
    line-height: 60px;
}
.user-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
}
.tenant-info {
    background: #f8f8f8;
    padding: 10px 15px;
    border-bottom: 1px solid #e6e6e6;
    font-size: 12px;
    color: #666;
}
.tenant-info strong {
    color: #1E9FFF;
}

/* ========== 仪表盘 ========== */
.dashboard-card {
    background: #fff;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}
.dashboard-card .card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}
.dashboard-card .card-value {
    font-size: 28px;
    font-weight: bold;
    color: #333;
}
.dashboard-card .card-change {
    font-size: 12px;
    margin-top: 5px;
}
.dashboard-card .card-change.up {
    color: #52c41a;
}
.dashboard-card .card-change.down {
    color: #f5222d;
}
.chart-container {
    height: 300px;
}
.top-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.top-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.top-list li:last-child {
    border-bottom: none;
}
.top-list .rank {
    width: 20px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
    margin-right: 10px;
    flex-shrink: 0;
}
.top-list .rank.top3 {
    background: #1E9FFF;
    color: #fff;
}
.recent-activity {
    padding: 0;
    margin: 0;
    list-style: none;
}
.recent-activity li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 25px;
}
.recent-activity li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 8px;
    height: 8px;
    background: #1E9FFF;
    border-radius: 50%;
}
.recent-activity .time {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

/* ========== 搜索区域 ========== */
.search-box {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ========== 商品相关 ========== */
.product-img {
    width: 50px;
    height: 50px;
    border-radius: 4px;
    object-fit: cover;
}
.tag-recommend {
    color: #f5222d;
    background: #fff1f0;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 5px;
}
.tag-new {
    color: #52c41a;
    background: #f6ffed;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 5px;
}
.tag-hot {
    color: #faad14;
    background: #fffbe6;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 11px;
}
.price-current {
    color: #f5222d;
    font-weight: bold;
    font-size: 14px;
}
.price-original {
    color: #999;
    text-decoration: line-through;
    font-size: 12px;
    margin-left: 5px;
}
.stock-low {
    color: #f5222d;
    font-weight: bold;
}
.stock-normal {
    color: #52c41a;
}

/* ========== 套餐标签 ========== */
.package-free {
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.package-basic {
    color: #1890ff;
    background: #e6f7ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.package-pro {
    color: #722ed1;
    background: #f9f0ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}
.package-enterprise {
    color: #f5222d;
    background: #fff1f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

/* ========== 分类树 ========== */
.category-tree {
    background: #fff;
    padding: 15px;
    border-radius: 4px;
    min-height: 400px;
}
.category-item {
    padding: 8px 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s;
}
.category-item:hover {
    background: #f0f7ff;
}
.category-item.active {
    background: #e6f7ff;
    color: #1E9FFF;
    font-weight: bold;
}
.category-children {
    padding-left: 20px;
}

/* ========== 上传区域 ========== */
.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}
.upload-area:hover {
    border-color: #1E9FFF;
}
.upload-area .upload-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 10px;
}
.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}
.upload-preview img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

/* ========== 富文本编辑器占位 ========== */
.editor-container {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    min-height: 300px;
}

/* ========== 页脚 ========== */
.layui-footer {
    text-align: center;
    padding: 15px;
    color: #999;
    font-size: 12px;
    background: #fff;
    border-top: 1px solid #eee;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .login-container {
        width: 90%;
        margin: 50px auto;
        padding: 20px;
    }
    .dashboard-card .card-value {
        font-size: 20px;
    }
}
