/* 操作日志页面原生样式 */
.op-log-wrapper {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    margin: 20px;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.op-log-header {
    padding: 18px 24px;
    border-bottom: 2px solid #0fa171;
}

.op-log-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.op-log-body {
    padding: 16px 24px 24px;
}

.op-log-toolbar {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.op-log-count {
    font-size: 13px;
    color: #666;
}

/* 表格 */
.op-log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.op-log-table thead tr {
    background: #f5f6fa;
}

.op-log-table th {
    padding: 10px 12px;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #e0e4ec;
    text-align: left;
    white-space: nowrap;
}

.op-log-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    vertical-align: middle;
}

.op-log-table tbody tr:hover {
    background: #f9fdfb;
}

.op-log-table tbody tr:last-child td {
    border-bottom: none;
}

/* 列宽 */
.col-seq { width: 50px; text-align: center !important; }
.col-user { width: 90px; }
.col-type { width: 100px; }
.col-target { width: 100px; }
.col-detail { }
.col-time { width: 150px; white-space: nowrap; }

/* 操作类型标签 */
.op-type-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.op-type-tag[data-type="修改权限"] {
    background: #e8f5e9;
    color: #2e7d32;
}

.op-type-tag[data-type="修改身份和账号归属"] {
    background: #e3f2fd;
    color: #1565c0;
}

.op-type-tag[data-type="修改账号归属"] {
    background: #fff3e0;
    color: #e65100;
}

.op-type-tag[data-type="修改提成配置"] {
    background: #fce4ec;
    color: #c62828;
}

/* 详情换行显示 */
.op-detail-text {
    word-break: break-all;
    max-width: 400px;
    line-height: 1.6;
}

.op-detail-added {
    color: #2e7d32;
    font-weight: 500;
}

.op-detail-removed {
    color: #c62828;
    font-weight: 500;
}

/* 分页 */
.op-log-pagination {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

.op-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s;
}

.op-page-btn:hover {
    border-color: #0fa171;
    color: #0fa171;
}

.op-page-btn.active {
    background: #0fa171;
    border-color: #0fa171;
    color: #fff;
}

.op-page-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    border-color: #eee;
}

.op-page-btn:disabled:hover {
    border-color: #eee;
    color: #ccc;
}

/* 加载状态 */
.loading-row td {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

.empty-row td {
    text-align: center;
    color: #999;
    padding: 40px !important;
}

/* 移动端适配 - 水平滑动 */
@media (max-width: 768px) {
    .op-log-wrapper {
        margin: 8px;
        border-radius: 4px;
    }

    .op-log-header {
        padding: 12px 14px;
    }

    .op-log-title {
        font-size: 15px;
    }

    .op-log-body {
        padding: 10px;
        /* 水平滚动容器 */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .op-log-toolbar {
        margin-bottom: 10px;
    }

    /* 表格保持原样，但允许水平滚动 */
    .op-log-table {
        min-width: 700px; /* 保证内容不被压缩 */
        font-size: 13px;
    }

    .op-log-table th {
        padding: 8px 10px;
        font-size: 12px;
    }

    .op-log-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* 列宽微调 */
    .col-seq { width: 40px; }
    .col-user { width: 70px; }
    .col-type { width: 90px; }
    .col-target { width: 80px; }
    .col-time { width: 130px; }

    /* 操作类型标签 */
    .op-type-tag {
        font-size: 11px;
        padding: 1px 6px;
    }

    /* 详情区域 */
    .op-detail-text {
        max-width: 200px;
        white-space: normal;
    }

    /* 分页居中 */
    .op-log-pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 3px;
        min-width: 700px; /* 保证分页也在滚动区域内 */
    }

    .op-page-btn {
        min-width: 28px;
        height: 28px;
        font-size: 12px;
        padding: 0 6px;
    }
}
