/* ============================================
   Settings Panel 优化 - 用户管理和权限配置
   ============================================ */

/* Settings Panel 优化 */
.settings-panel {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.section-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
}

.section-desc {
    font-size: 13px;
    color: #718096;
}

.status-text {
    margin-left: 12px;
    font-size: 13px;
}

/* 用户管理表格 */
#user-list-container .data-table {
    width: 100%;
    border-collapse: collapse;
}

#user-list-container .data-table th {
    background: #f7fafc;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

#user-list-container .data-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

#user-list-container .data-table tr:hover {
    background: #f7fafc;
}

#user-list-container select {
    padding: 6px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

#user-list-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.user-status-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
}

.user-status-label .status-badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #48bb78;
}

.user-status-label .status-badge.inactive {
    background: #cbd5e0;
}

/* 按钮样式补充 */
.btn-danger {
    background: #fff;
    color: #e53e3e;
    border: 1px solid #e53e3e;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: #e53e3e;
    color: #fff;
}

/* 角色权限矩阵 */
.role-matrix-wrapper {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
}

.role-matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.role-matrix-table th {
    background: #edf2f7;
    padding: 14px 12px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: #2d3748;
    border-bottom: 2px solid #e2e8f0;
}

.role-matrix-table th .role-code {
    display: block;
    font-size: 11px;
    color: #a0aec0;
    font-weight: 400;
    margin-top: 2px;
}

.role-matrix-table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.role-matrix-table td:first-child {
    text-align: left;
    background: #fafafa;
}

.role-matrix-table .perm-name {
    font-size: 13px;
    font-weight: 500;
    color: #2d3748;
}

.role-matrix-table .perm-code {
    font-size: 11px;
    color: #a0aec0;
    display: block;
    margin-top: 2px;
}

.role-matrix-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.role-matrix-table input[type="checkbox"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.role-save-buttons {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.role-save-buttons .btn {
    padding: 8px 16px;
    font-size: 13px;
}

/* 角色说明 */
.role-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.role-info-item {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.role-info-item strong {
    display: block;
    font-size: 14px;
    color: #2d3748;
    margin-bottom: 6px;
}

.role-info-item p {
    font-size: 13px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .role-info-grid {
        grid-template-columns: 1fr;
    }
}
